summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-01-12 13:35:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-01-12 13:35:32 +0300
commitdbf80cecba66c3171ccebb6c22d85c3b52637882 (patch)
tree18757d1b8237c4f5e5580fe9de5b67d4b011ac25 /src
parent18ba68228c2a8bce02a7bce1569be9998570d5f2 (diff)
downloadmv-dbf80cecba66c3171ccebb6c22d85c3b52637882.tar.gz
mv-dbf80cecba66c3171ccebb6c22d85c3b52637882.tar.bz2
mv-dbf80cecba66c3171ccebb6c22d85c3b52637882.tar.xz
mv-dbf80cecba66c3171ccebb6c22d85c3b52637882.zip
fix compilation warnings.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/textfield.cpp4
-rw-r--r--src/gui/windows/updaterwindow.cpp12
-rw-r--r--src/resources/beingcommon.h8
-rw-r--r--src/resources/db/colordb.cpp4
-rw-r--r--src/resources/db/monsterdb.cpp4
5 files changed, 16 insertions, 16 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 58a1f7e18..b4d72a1a7 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -609,7 +609,7 @@ void TextField::caretDeleteToStart()
void TextField::moveCaretWordBack()
{
- const int oldCaret = mCaretPosition;
+ const unsigned int oldCaret = mCaretPosition;
while (mCaretPosition > 0)
{
if (!isWordSeparator(mText[mCaretPosition - 1]))
@@ -629,7 +629,7 @@ void TextField::moveCaretWordBack()
void TextField::moveCaretWordForward()
{
const unsigned sz = static_cast<unsigned>(mText.size());
- const int oldCaret = mCaretPosition;
+ const unsigned int oldCaret = mCaretPosition;
while (mCaretPosition < sz)
{
if (!isWordSeparator(mText[mCaretPosition]))
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 7ecfb0d7d..76cfb801f 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -653,9 +653,9 @@ void UpdaterWindow::loadManaPlusUpdates(const std::string &dir,
if (strStartWith(name, "manaplus_"))
{
struct stat statbuf;
- std::string file = std::string(fixPath).append("/").append(name);
- if (!stat(file.c_str(), &statbuf))
- resman->addToSearchPath(file, false);
+ std::string fileName = std::string(fixPath).append("/").append(name);
+ if (!stat(fileName.c_str(), &statbuf))
+ resman->addToSearchPath(fileName, false);
}
}
}
@@ -1028,10 +1028,10 @@ void UpdaterWindow::loadMods(const std::string &dir,
if (it != modsList.end())
{
struct stat statbuf;
- std::string file = std::string(fixPath).append(
+ std::string fileName = std::string(fixPath).append(
"/").append(name);
- if (!stat(file.c_str(), &statbuf))
- resman->addToSearchPath(file, false);
+ if (!stat(fileName.c_str(), &statbuf))
+ resman->addToSearchPath(fileName, false);
}
}
}
diff --git a/src/resources/beingcommon.h b/src/resources/beingcommon.h
index 15bab1a34..5fb1df71b 100644
--- a/src/resources/beingcommon.h
+++ b/src/resources/beingcommon.h
@@ -30,11 +30,11 @@
class BeingInfo;
#define loadXmlDir(name, function) \
- StringVect list; \
+ StringVect listVect; \
BeingCommon::getIncludeFiles(paths.getStringValue( \
- name), list); \
- FOR_EACH (StringVectCIter, it, list) \
- function(*it);
+ name), listVect); \
+ FOR_EACH (StringVectCIter, itVect, listVect) \
+ function(*itVect);
namespace BeingCommon
{
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index 06dff0d3a..e4d5b83a0 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -54,8 +54,8 @@ void ColorDB::load()
StringVect list;
BeingCommon::getIncludeFiles(paths.getStringValue(
"hairColorPatchDir"), list);
- FOR_EACH (StringVectCIter, it, list)
- loadHair(*it, colors);
+ FOR_EACH (StringVectCIter, it2, list)
+ loadHair(*it2, colors);
mColorLists["hair"] = colors;
diff --git a/src/resources/db/monsterdb.cpp b/src/resources/db/monsterdb.cpp
index 1fc767a2b..9b9112f0f 100644
--- a/src/resources/db/monsterdb.cpp
+++ b/src/resources/db/monsterdb.cpp
@@ -208,7 +208,7 @@ void MonsterDB::loadXmlFile(const std::string &fileName)
}
else if (xmlNameEqual(spriteNode, "attack"))
{
- const int id = XML::getProperty(spriteNode, "id", 0);
+ const int attackId = XML::getProperty(spriteNode, "id", 0);
const int effectId = XML::getProperty(
spriteNode, "effect-id", paths.getIntValue("effectId"));
const int hitEffectId = XML::getProperty(spriteNode,
@@ -229,7 +229,7 @@ void MonsterDB::loadXmlFile(const std::string &fileName)
const std::string missileParticle = XML::getProperty(
spriteNode, "missile-particle", "");
- currentInfo->addAttack(id, spriteAction, skySpriteAction,
+ currentInfo->addAttack(attackId, spriteAction, skySpriteAction,
waterSpriteAction, effectId, hitEffectId,
criticalHitEffectId, missEffectId, missileParticle);
}