diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-17 20:23:33 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-04 21:41:25 +0100 |
commit | ad276ae0d4679aee9d7e6082fa602b49c6fd940a (patch) | |
tree | df3ff4eb6a315faaf722815c4af1e6398a40e81f /src/resources/dye.cpp | |
parent | 33130dd288f5842f0edde0fff8618cdfe3afc856 (diff) | |
download | mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.gz mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.bz2 mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.tar.xz mana-ad276ae0d4679aee9d7e6082fa602b49c6fd940a.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.
(cherry picked from mainline)
Diffstat (limited to 'src/resources/dye.cpp')
-rw-r--r-- | src/resources/dye.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp index 3be105d8..d180d725 100644 --- a/src/resources/dye.cpp +++ b/src/resources/dye.cpp @@ -26,7 +26,7 @@ #include "../log.h" -Palette::Palette(std::string const &description) +Palette::Palette(const std::string &description) { int size = description.length(); if (size == 0) return; @@ -109,7 +109,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; @@ -175,7 +175,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; |