summaryrefslogtreecommitdiff
path: root/src/gui/palette.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-22 20:27:48 +0100
committerIra Rice <irarice@gmail.com>2009-03-22 15:29:30 -0600
commit46a368e2f6fd8fcc30949c6676045e2005bd5bfa (patch)
tree7a7cd383d368e58f60953ec9d0fe86549294c199 /src/gui/palette.cpp
parent3fc81e3ad181f6904277e73d99d753a8b7498bf0 (diff)
downloadmana-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.tar.gz
mana-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.tar.bz2
mana-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.tar.xz
mana-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.zip
Fixed some compiler warnings
Superfluous semicolons, initialization order and signed/unsigned mismatches.
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r--src/gui/palette.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp
index d3e06902..d3655e04 100644
--- a/src/gui/palette.cpp
+++ b/src/gui/palette.cpp
@@ -45,12 +45,12 @@ const gcn::Color Palette::RAINBOW_COLORS[7] = {
/** Number of Elemets of RAINBOW_COLORS */
const int Palette::RAINBOW_COLOR_COUNT = 7;
-std::string Palette::getConfigName(const std::string& typeName)
+std::string Palette::getConfigName(const std::string &typeName)
{
std::string res = "Color" + typeName;
int pos = 5;
- for (unsigned int i = 0; i < typeName.length(); i++)
+ for (size_t i = 0; i < typeName.length(); i++)
{
if (i == 0 || typeName[i] == '_')
{
@@ -70,7 +70,7 @@ std::string Palette::getConfigName(const std::string& typeName)
return res;
}
-DEFENUMNAMES(ColorType, COLOR_TYPE);
+DEFENUMNAMES(ColorType, COLOR_TYPE)
const int Palette::GRADIENT_DELAY = 40;
@@ -177,7 +177,7 @@ void Palette::setGradient(ColorType type, GradientType grad)
ColorElem *elem = &mColVector[type];
if (elem->grad != STATIC && grad == STATIC)
{
- for (unsigned int i = 0; i < mGradVector.size(); i++)
+ for (size_t i = 0; i < mGradVector.size(); i++)
{
if (mGradVector[i] == elem)
{
@@ -278,7 +278,7 @@ void Palette::advanceGradient ()
int advance = get_elapsed_time(mRainbowTime) / 5;
double startColVal, destColVal;
- for (unsigned int i = 0; i < mGradVector.size(); i++)
+ for (size_t i = 0; i < mGradVector.size(); i++)
{
mGradVector[i]->gradientIndex =
(mGradVector[i]->gradientIndex + advance) %