From d2e83863e6e5faa6d6eeb3ab0c0a384dac3a0a11 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 21 May 2011 02:01:24 +0300 Subject: Fix some issues after automatic code checking. --- src/gui/viewport.cpp | 2 +- src/gui/widgets/layout.h | 2 ++ src/net/ea/beinghandler.cpp | 11 ++++------- src/net/ea/buysellhandler.cpp | 5 +++-- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index e399d96ce..1053fa1c9 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -318,7 +318,7 @@ void Viewport::_drawDebugPath(Graphics *graphics) // Draw the path debug information for every beings. ActorSpritesConstIterator it, it_end; const ActorSprites &actors = actorSpriteManager->getAll(); - for (it = actors.begin(), it_end = actors.end() ; it != it_end; it++) + for (it = actors.begin(), it_end = actors.end() ; it != it_end; ++ it) { Being *being = dynamic_cast(*it); if (being && being != player_node) diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h index 2621f018a..f5e1f1749 100644 --- a/src/gui/widgets/layout.h +++ b/src/gui/widgets/layout.h @@ -183,6 +183,8 @@ class LayoutCell mAlign[1] = 0; mNbFill[0] = 0; mNbFill[1] = 0; + mSize[0] = 0; + mSize[1] = 0; } ~LayoutCell(); diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 91c83a4e9..f59283e23 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -121,10 +121,8 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, bool visible) Uint16 weapon, shield; Uint16 stunMode; Uint32 statusEffects; - int guild; Being *dstBeing; int hairStyle, hairColor; - int hp, maxHP, oldHP; int spawnId; // Information about a being in range @@ -214,22 +212,21 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, bool visible) if (dstBeing->getType() == ActorSprite::MONSTER) { - hp = msg.readInt32(); - maxHP = msg.readInt32(); + int hp = msg.readInt32(); + int maxHP = msg.readInt32(); if (hp && maxHP) { - oldHP = dstBeing->getHP(); + int oldHP = dstBeing->getHP(); if (!oldHP || oldHP > hp) dstBeing->setHP(hp); dstBeing->setMaxHP(maxHP); } gloves = 0; - guild = 0; } else { gloves = msg.readInt16(); // head dir - "abused" as gloves - guild = msg.readInt32(); // guild + msg.readInt32(); // guild msg.readInt16(); // guild emblem } // logger->log("being guild: " + toString(guild)); diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index 35180c10f..2ee586c92 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -47,9 +47,10 @@ namespace Ea { -BuySellHandler::BuySellHandler() +BuySellHandler::BuySellHandler() : + mNpcId(0), + mBuyDialog(0) { - mNpcId = 0; } void BuySellHandler::requestSellList(std::string nick) -- cgit v1.2.3-70-g09d2