From d42aa0fad2f04b4e021b20b313ba6c9fb0d4e9d5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Apr 2014 19:53:23 +0300 Subject: Fix code style in being. --- src/being/being.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/being/being.cpp') diff --git a/src/being/being.cpp b/src/being/being.cpp index 683bfb6f5..182bf3947 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -179,8 +179,8 @@ Being::Being(const int id, const Type type, const uint16_t subtype, mCriticalHit(0), mPvpRank(0), mNumber(100), - mLook(0), mUsageCounter(1), + mLook(0U), mHairColor(0), mErased(false), mEnemy(false), @@ -1331,7 +1331,7 @@ void Being::nextTile() mActionTime += static_cast(mSpeed / 10); if ((mType != PLAYER || mUseDiagonal) && mX != pos.x && mY != pos.y) - mSpeed = mWalkSpeed.x * 1.4; + mSpeed = static_cast(mWalkSpeed.x * 1.4F); else mSpeed = mWalkSpeed.x; @@ -1535,7 +1535,7 @@ void Being::petLogic() } } - const int walkMask = getWalkMask(); + const unsigned char walkMask = getWalkMask(); if (!mMap->getWalk(dstX, dstY, walkMask)) { if (dstX != dstX0) @@ -1592,7 +1592,7 @@ void Being::petLogic() break; } - int newDir = 0; + uint8_t newDir = 0; switch (directionType) { case 0: @@ -2783,7 +2783,7 @@ int Being::searchSlotValue(const std::vector &slotRemap, for (size_t slot = 0; slot < sz; slot ++) { if (slotRemap[slot] == val) - return slot; + return static_cast(slot); } return getNumberOfLayers() - 1; } @@ -3271,7 +3271,7 @@ void Being::playSfx(const SoundInfo &sound, Being *const being, } } -void Being::setLook(const int look) +void Being::setLook(const uint8_t look) { if (mType == PLAYER) setSubtype(mSubType, look); -- cgit v1.2.3-70-g09d2