summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-09 15:43:27 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-09 18:44:03 +0300
commite5726a11424ebd48f12d76149ec7e5e2b6278bdd (patch)
treebdcb9987f4109513a99f3a46e01687babc94a243 /src/being
parentb4bdf86b6dd57045bd2d80cfcd5e0a428a5054b3 (diff)
downloadplus-e5726a11424ebd48f12d76149ec7e5e2b6278bdd.tar.gz
plus-e5726a11424ebd48f12d76149ec7e5e2b6278bdd.tar.bz2
plus-e5726a11424ebd48f12d76149ec7e5e2b6278bdd.tar.xz
plus-e5726a11424ebd48f12d76149ec7e5e2b6278bdd.zip
Fix code style.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actorsprite.cpp8
-rw-r--r--src/being/being.cpp2
-rw-r--r--src/being/being.h2
-rw-r--r--src/being/playerinfo.h1
4 files changed, 6 insertions, 7 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 936885ed2..ece1320f8 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -138,10 +138,6 @@ void ActorSprite::controlParticle(Particle *const particle)
void ActorSprite::setTargetType(const TargetCursorType type)
{
- static const int targetWidths[ActorSprite::NUM_TC] = {0, 0, 0};
- static const int targetHeights[ActorSprite::NUM_TC]
- = {-mapTileSize / 2, -mapTileSize / 2, -mapTileSize};
-
if (type == TCT_NONE)
{
untarget();
@@ -152,6 +148,10 @@ void ActorSprite::setTargetType(const TargetCursorType type)
mUsedTargetCursor = targetCursor[static_cast<int>(type)][sz];
if (mUsedTargetCursor)
{
+ static const int targetWidths[ActorSprite::NUM_TC] = {0, 0, 0};
+ static const int targetHeights[ActorSprite::NUM_TC]
+ = {-mapTileSize / 2, -mapTileSize / 2, -mapTileSize};
+
mCursorPaddingX = static_cast<int>(targetWidths[sz]);
mCursorPaddingY = static_cast<int>(targetHeights[sz]);
}
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 8b1c8a7ba..386c07e92 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -2535,7 +2535,7 @@ void Being::recalcSpritesOrder()
for (size_t slot = 0; slot < sz; slot ++)
{
- slotRemap.push_back(slot);
+ slotRemap.push_back(static_cast<int>(slot));
if (spriteIdSize <= slot)
continue;
diff --git a/src/being/being.h b/src/being/being.h
index 208b2b56b..989036974 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -530,7 +530,7 @@ class Being : public ActorSprite, public ConfigListener
SpriteDirection getSpriteDirection() const A_WARN_UNUSED
{ return static_cast<SpriteDirection>(mSpriteDirection); }
- void setPosition(const Vector &pos);
+ void setPosition(const Vector &pos) override;
/**
* Overloaded method provided for convenience.
diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h
index 02dc4897c..861e7faf4 100644
--- a/src/being/playerinfo.h
+++ b/src/being/playerinfo.h
@@ -26,7 +26,6 @@
#include "state.h"
#include <map>
-#include <string>
/**
* Stat information storage structure.