diff options
-rw-r--r-- | src/commandhandler.cpp | 1 | ||||
-rw-r--r-- | src/gui/popupmenu.cpp | 2 | ||||
-rw-r--r-- | src/gui/socialwindow.cpp | 4 | ||||
-rw-r--r-- | src/net/download.cpp | 1 | ||||
-rw-r--r-- | src/resources/image.cpp | 4 |
5 files changed, 5 insertions, 7 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 862ac56b4..04ef1b3f4 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -406,7 +406,6 @@ void CommandHandler::handleParty(const std::string &args, ChatTab *tab) void CommandHandler::handleMe(const std::string &args, ChatTab *tab) { - const std::string str = strprintf("*%s*", args.c_str()); outString(tab, strprintf("*%s*", args.c_str()), args); } diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 15afc7600..283fcb99e 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -367,7 +367,7 @@ void PopupMenu::showPopup(int x, int y, std::vector<ActorSprite*> &beings) being->getId(), (being->getName() + being->getGenderSignWithSpace()).c_str())); } - else if(actor->getType() == ActorSprite::FLOOR_ITEM) + else if (actor->getType() == ActorSprite::FLOOR_ITEM) { FloorItem *floorItem = static_cast<FloorItem*>(actor); const ItemInfo &info = floorItem->getInfo(); diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 2bc8aba9b..72dd2104d 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -848,11 +848,11 @@ public: std::vector<Avatar*> *avatars = mBeings->getMembers(); - std::vector<Avatar*>::iterator i = avatars->begin(); - if (!avatars) return; + std::vector<Avatar*>::iterator i = avatars->begin(); + while (i != avatars->end()) { Avatar *ava = (*i); diff --git a/src/net/download.cpp b/src/net/download.cpp index 5141c022e..21881471b 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -180,7 +180,6 @@ int Download::downloadProgress(void *clientp, double dltotal, double dlnow, return d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_CANCELLED, static_cast<size_t>(dltotal), static_cast<size_t>(dlnow)); - return -5; } return d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_IDLE, diff --git a/src/resources/image.cpp b/src/resources/image.cpp index df07c16a2..4cdcdb001 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -473,10 +473,10 @@ Image* Image::SDLmerge(Image *image, int x, int y) static_cast<Uint16>(mBounds.h - y)); // for each pixel lines of a source image - for (offset_x = (x > 0 ? 0 : -x); offset_x < maxX; offset_x++) + for (offset_x = ((x > 0) ? 0 : -x); offset_x < maxX; offset_x++) { const int x1 = x0 + offset_x; - for (offset_y = (y > 0 ? 0 : -y); offset_y < maxY; offset_y++) + for (offset_y = ((y > 0) ? 0 : -y); offset_y < maxY; offset_y++) { // Computing offset on both images current_offset = (offset_y * getWidth()) + x1; |