diff options
-rw-r--r-- | src/gui/popups/itempopup.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index f521dee50..2a082c05e 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -270,7 +270,8 @@ void ItemPopup::setItem(const ItemInfo &item, mItemName->adjustSize(); setLabelColor(mItemName, mItemType); mItemName->setPosition(space, 0); - const std::string readableEffect = replaceChar((char*)item.getEffect().c_str(), '/', '\n'); + const std::string readableEffect = + replaceChar((char*)item.getEffect().c_str(), '/', '\n'); mItemEffect->setTextWrapped(readableEffect, 196); // TRANSLATORS: popup label mItemWeight->setTextWrapped(strprintf(_("Weight: %s"), @@ -469,12 +470,12 @@ void ItemPopup::resetPopup() char* ItemPopup::replaceChar(char* str, char find, char replace) { - char *currentPos = str; - while ((currentPos = strchr(currentPos, find)) != NULL) - { - *currentPos = ' '; - currentPos++; - *currentPos = replace; - } - return str; + char *currentPos = str; + while ((currentPos = strchr(currentPos, find)) != NULL) + { + *currentPos = ' '; + currentPos++; + *currentPos = replace; + } + return str; } |