summaryrefslogtreecommitdiff
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
parent3fc81e3ad181f6904277e73d99d753a8b7498bf0 (diff)
downloadmana-client-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.tar.gz
mana-client-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.tar.bz2
mana-client-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.tar.xz
mana-client-46a368e2f6fd8fcc30949c6676045e2005bd5bfa.zip
Fixed some compiler warnings
Superfluous semicolons, initialization order and signed/unsigned mismatches.
-rw-r--r--src/gui/palette.cpp10
-rw-r--r--src/gui/palette.h2
2 files changed, 6 insertions, 6 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) %
diff --git a/src/gui/palette.h b/src/gui/palette.h
index ccef231e..cdeaa48d 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -93,7 +93,7 @@ class Palette : public gcn::ListModel
ENTRY(MISS)\
ENTRY(TYPE_COUNT)\
- TEXTENUM(ColorType, COLOR_TYPE);
+ TEXTENUM(ColorType, COLOR_TYPE)
/** Colors can be static or can alter over time. */
enum GradientType {