summaryrefslogtreecommitdiff
path: root/src/actorspritemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 23:47:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 23:47:11 +0300
commitf24ddad3fa0f843eb29a281426151cf1a5f31f4b (patch)
tree6f3faaf38f069f1e88435b7c976ff4070b7a1dcb /src/actorspritemanager.cpp
parent3a407bb6b73a186eafd99bcec570f88097c4b2e1 (diff)
downloadManaVerse-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.tar.gz
ManaVerse-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.tar.bz2
ManaVerse-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.tar.xz
ManaVerse-f24ddad3fa0f843eb29a281426151cf1a5f31f4b.zip
add const to more classes,
fix other small style issues.
Diffstat (limited to 'src/actorspritemanager.cpp')
-rw-r--r--src/actorspritemanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index 61fd35c95..73d522527 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -692,7 +692,7 @@ Being *ActorSpriteManager::findBeingByName(const std::string &name,
}
Being *ActorSpriteManager::findNearestByName(const std::string &name,
- const Being::Type type) const
+ const Being::Type &type) const
{
if (!player_node)
return nullptr;
@@ -847,7 +847,6 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
if (!aroundBeing || !player_node)
return nullptr;
- Being *closestBeing = nullptr;
std::set<std::string> attackMobs;
std::set<std::string> priorityMobs;
std::set<std::string> ignoreAttackMobs;
@@ -995,6 +994,7 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
{
int dist = 0;
int index = defaultPriorityIndex;
+ Being *closestBeing = nullptr;
for (ActorSprites::const_iterator i = mActors.begin(),
i_end = mActors.end();