summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 5a4bcd737..090e7d10d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -2155,20 +2155,20 @@ void Being::recalcSpritesOrder()
if (spriteToItems)
{
- SpriteToItemMap::iterator it;
+ SpriteToItemMap::const_iterator it;
for (it = spriteToItems->begin();
it != spriteToItems->end(); ++it)
{
int removeSprite = it->first;
- std::map<int, int> &itemReplacer = it->second;
+ const std::map<int, int> &itemReplacer = it->second;
if (itemReplacer.empty())
{
mSpriteHide[removeSprite] = 1;
}
else
{
- std::map<int, int>::iterator repIt
+ std::map<int, int>::const_iterator repIt
= itemReplacer.find(mSpriteIDs[removeSprite]);
if (repIt != itemReplacer.end())
{
@@ -2188,7 +2188,7 @@ void Being::recalcSpritesOrder()
if (info.mDrawBefore[dir] > 0)
{
int id2 = mSpriteIDs[info.mDrawBefore[dir]];
- std::map<int, int>::iterator orderIt = itemSlotRemap.find(id2);
+ std::map<int, int>::const_iterator orderIt = itemSlotRemap.find(id2);
if (orderIt != itemSlotRemap.end())
{
// logger->log("found duplicate (before)");
@@ -2211,7 +2211,7 @@ void Being::recalcSpritesOrder()
else if (info.mDrawAfter[dir] > 0)
{
int id2 = mSpriteIDs[info.mDrawAfter[dir]];
- std::map<int, int>::iterator orderIt = itemSlotRemap.find(id2);
+ std::map<int, int>::const_iterator orderIt = itemSlotRemap.find(id2);
if (orderIt != itemSlotRemap.end())
{
// logger->log("found duplicate (after)");
@@ -2256,7 +2256,7 @@ void Being::recalcSpritesOrder()
int idx1 = -1;
// logger->log("item %d, id=%d", slot, id);
int reorder = 0;
- std::map<int, int>::iterator orderIt = itemSlotRemap.find(id);
+ std::map<int, int>::const_iterator orderIt = itemSlotRemap.find(id);
if (orderIt != itemSlotRemap.end())
reorder = orderIt->second;