summaryrefslogtreecommitdiff
path: root/src/resources/dye.cpp
diff options
context:
space:
mode:
authorSteve Cotton <steve@s.cotton.clara.co.uk>2009-03-16 19:04:38 +0000
committerSteve Cotton <steve@s.cotton.clara.co.uk>2009-03-16 19:04:38 +0000
commit13b064998c0f7142a134817c9dde08ad29db97fe (patch)
treeaa7177718259171a6d47414b1ab143afc0146ded /src/resources/dye.cpp
parent94495012ea5919cddaf47e7a7818fd8ba4e76708 (diff)
downloadmana-client-13b064998c0f7142a134817c9dde08ad29db97fe.tar.gz
mana-client-13b064998c0f7142a134817c9dde08ad29db97fe.tar.bz2
mana-client-13b064998c0f7142a134817c9dde08ad29db97fe.tar.xz
mana-client-13b064998c0f7142a134817c9dde08ad29db97fe.zip
Code reformatting
Cherry-picking changes from Bjørn's 1b3cb122be1a418ce82b66fb9ce1ecf3aa5813fb 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 'src/resources/dye.cpp')
-rw-r--r--src/resources/dye.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resources/dye.cpp b/src/resources/dye.cpp
index a5998017..92176852 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;