diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actormanager.cpp | 4 | ||||
-rw-r--r-- | src/being/being.cpp | 3 | ||||
-rw-r--r-- | src/gui/popups/itempopup.cpp | 3 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 1 | ||||
-rw-r--r-- | src/gui/sdlinput.h | 2 | ||||
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/guildrecv.cpp | 2 | ||||
-rw-r--r-- | src/pincodemanager.cpp | 1 | ||||
-rw-r--r-- | src/text.h | 2 | ||||
-rw-r--r-- | src/utils/stringutils.cpp | 14 |
10 files changed, 11 insertions, 23 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index 732b342b2..51becef39 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1850,9 +1850,7 @@ void ActorManager::optionChanged(const std::string &name) mCycleNPC = config.getBoolValue("cycleNPC"); else if (name == "extMouseTargeting") mExtMouseTargeting = config.getBoolValue("extMouseTargeting"); - else if (name == "showBadges") - updateBadges(); - else if (name == "visiblenamespos") + else if (name == "showBadges" || name == "visiblenamespos") updateBadges(); else if (name == "enableIdCollecting") mEnableIdCollecting = config.getBoolValue("enableIdCollecting"); diff --git a/src/being/being.cpp b/src/being/being.cpp index 6c846ce91..74942999e 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -2065,9 +2065,6 @@ void Being::botLogic() restrict2 break; } case BeingAction::SIT: - botFixOffset(dstX, dstY); - moveBotTo(dstX, dstY); - break; case BeingAction::DEAD: botFixOffset(dstX, dstY); moveBotTo(dstX, dstY); diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp index e96d2845b..0e9dd031f 100644 --- a/src/gui/popups/itempopup.cpp +++ b/src/gui/popups/itempopup.cpp @@ -350,9 +350,6 @@ std::string ItemPopup::getCardsString(const int *const cards) return label; } case CARD0_FORGE: // forged item - { - return label; - } case CARD0_PET: { return label; diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 435d35111..dcba43e1f 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -2082,7 +2082,6 @@ void PopupMenu::showAttackMonsterPopup(const int x, const int y, break; } case MapItemType::IGNORE_: - break; default: break; } diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index 65691e299..7c5bc5d30 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -320,8 +320,6 @@ class SDLInput final value = KeyValue::RIGHT; break; case SDLK_RETURN: - value = KeyValue::ENTER; - break; case SDLK_KP_ENTER: value = KeyValue::ENTER; break; diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 1961be9a7..cbc295a5b 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1295,8 +1295,6 @@ void BeingRecv::processBeingAction2(Net::MessageIn &msg) break; case AttackType::PICKUP: - break; - case AttackType::TOUCH_SKILL: break; diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 37d789312..bdb2b4517 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -75,7 +75,7 @@ void GuildRecv::processGuildCreateResponse(Net::MessageIn &msg) case 2: // Unable to make (likely name already in use) - NotifyManager::notify(NotifyTypes::GUILD_ALREADY); + NotifyManager::notify(NotifyTypes::GUILD_ERROR); break; case 3: diff --git a/src/pincodemanager.cpp b/src/pincodemanager.cpp index 9f5a41b2b..f2b4a5492 100644 --- a/src/pincodemanager.cpp +++ b/src/pincodemanager.cpp @@ -291,7 +291,6 @@ bool PincodeManager::processPincodeStatus(const uint16_t state) pincodeManager.wrongPin(); return true; case 6: // Unable to use your KSSN number - break; case 7: // char select window shows a button break; default: diff --git a/src/text.h b/src/text.h index cb105fc32..2c0a6f551 100644 --- a/src/text.h +++ b/src/text.h @@ -109,7 +109,7 @@ class FlashText final : public Text FlashText(const std::string &text, const int x, const int y, const Graphics::Alignment alignment, const Color *const color, - Font *const font = nullptr); + Font *const font); A_DELETE_COPY(FlashText) diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 3af63f96e..99160905d 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -338,10 +338,11 @@ std::string getFileName(const std::string &path) { size_t pos1 = path.rfind('/'); const size_t pos2 = path.rfind('\\'); - if (pos1 == std::string::npos) - pos1 = pos2; - else if (pos2 != std::string::npos && pos2 > pos1) + if (pos1 == std::string::npos || + (pos2 != std::string::npos && pos2 > pos1)) + { pos1 = pos2; + } if (pos1 == std::string::npos) return path; @@ -352,10 +353,11 @@ std::string getFileDir(const std::string &path) { size_t pos1 = path.rfind('/'); const size_t pos2 = path.rfind('\\'); - if (pos1 == std::string::npos) - pos1 = pos2; - else if (pos2 != std::string::npos && pos2 > pos1) + if (pos1 == std::string::npos || + (pos2 != std::string::npos && pos2 > pos1)) + { pos1 = pos2; + } if (pos1 == std::string::npos) return path; |