diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-17 20:10:51 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-17 20:10:51 +0100 |
commit | 1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb (patch) | |
tree | 02556c7271844901a023b84b0fa84982ccff9bff /tools | |
parent | 3dba40474d5b1525e8723139ae7be7576967feea (diff) | |
download | mana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.gz mana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.bz2 mana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.tar.xz mana-1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb.zip |
Code reformatting
Mainly making sure 'const std::string &' is used everywhere instead of
'std::string const &'. The former has always been the preferred order in
this project.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dyecmd/src/dye.cpp | 6 | ||||
-rw-r--r-- | tools/dyecmd/src/dye.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/dyecmd/src/dye.cpp b/tools/dyecmd/src/dye.cpp index c93f46c8..058e0515 100644 --- a/tools/dyecmd/src/dye.cpp +++ b/tools/dyecmd/src/dye.cpp @@ -24,7 +24,7 @@ #include "dye.h" -Palette::Palette(std::string const &description) +Palette::Palette(const std::string &description) { int size = description.length(); if (size == 0) return; @@ -105,7 +105,7 @@ void Palette::getColor(int intensity, int color[3]) const color[2] = ((255 - t) * b1 + t * b2) / 255; } -Dye::Dye(std::string const &description) +Dye::Dye(const std::string &description) { for (int i = 0; i < 7; ++i) mPalettes[i] = 0; @@ -169,7 +169,7 @@ void Dye::update(int color[3]) const mPalettes[i - 1]->getColor(cmax, color); } -void Dye::instantiate(std::string &target, std::string const &palettes) +void Dye::instantiate(std::string &target, const std::string &palettes) { std::string::size_type next_pos = target.find('|'); if (next_pos == std::string::npos || palettes.empty()) return; diff --git a/tools/dyecmd/src/dye.h b/tools/dyecmd/src/dye.h index 528a1d91..f0bd7aab 100644 --- a/tools/dyecmd/src/dye.h +++ b/tools/dyecmd/src/dye.h @@ -36,7 +36,7 @@ class Palette * The string is either a file name or a sequence of hexadecimal RGB * values separated by ',' and starting with '#'. */ - Palette(std::string const &); + Palette(const std::string &); /** * Gets a pixel color depending on its intensity. @@ -63,7 +63,7 @@ class Dye * The parts of string are separated by semi-colons. Each part starts * by an uppercase letter, followed by a colon and then a palette name. */ - Dye(std::string const &); + Dye(const std::string &); /** * Destroys the associated palettes. @@ -79,7 +79,7 @@ class Dye * Fills the blank in a dye placeholder with some palette names. */ static void instantiate(std::string &target, - std::string const &palettes); + const std::string &palettes); private: |