summaryrefslogtreecommitdiff
path: root/src/actorspritemanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-18 17:48:29 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-18 17:49:00 +0200
commitf98d003e354a1792117b7cbc771d1dd91475a156 (patch)
treedc2a297f7c4026394c9954ae4bfd4abd22ef9612 /src/actorspritemanager.cpp
parentbb0a6cb25b2985fd1f74c9d27d5a46f6863e2dee (diff)
downloadmv-f98d003e354a1792117b7cbc771d1dd91475a156.tar.gz
mv-f98d003e354a1792117b7cbc771d1dd91475a156.tar.bz2
mv-f98d003e354a1792117b7cbc771d1dd91475a156.tar.xz
mv-f98d003e354a1792117b7cbc771d1dd91475a156.zip
Fix most old style cast except manaserv and libxml2 defines.
Diffstat (limited to 'src/actorspritemanager.cpp')
-rw-r--r--src/actorspritemanager.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index b50c92ff5..302b656d7 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -101,9 +101,11 @@ class SortBeingFunctor
if (Net::getNetworkType() == ServerInfo::MANASERV)
{
const Vector &pos1 = being1->getPosition();
- d1 = abs(((int) pos1.x) - x) + abs(((int) pos1.y) - y);
+ d1 = abs((static_cast<int>(pos1.x)) - x)
+ + abs((static_cast<int>(pos1.y)) - y);
const Vector &pos2 = being2->getPosition();
- d2 = abs(((int) pos2.x) - x) + abs(((int) pos2.y) - y);
+ d2 = abs((static_cast<int>(pos2.x)) - x)
+ + abs((static_cast<int>(pos2.y)) - y);
}
else
{
@@ -862,7 +864,7 @@ bool ActorSpriteManager::hasActorSprite(ActorSprite *actor) const
void ActorSpriteManager::addBlock(Uint32 id)
{
bool alreadyBlocked(false);
- for (int i = 0; i < (int)blockedBeings.size(); ++i)
+ for (int i = 0; i < static_cast<int>(blockedBeings.size()); ++i)
{
if (id == blockedBeings.at(i))
{
@@ -890,7 +892,7 @@ void ActorSpriteManager::deleteBlock(Uint32 id)
bool ActorSpriteManager::isBlocked(Uint32 id)
{
bool blocked(false);
- for (int i = 0; i < (int)blockedBeings.size(); ++i)
+ for (int i = 0; i < static_cast<int>(blockedBeings.size()); ++i)
{
if (id == blockedBeings.at(i))
{