diff options
-rw-r--r-- | src/being/being.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/guildhandler.h | 6 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 2 | ||||
-rw-r--r-- | src/utils/gettexthelper.cpp | 7 | ||||
-rw-r--r-- | src/utils/stringutils.cpp | 2 |
7 files changed, 9 insertions, 14 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index c7c9e1769..da67becda 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -3062,8 +3062,7 @@ void Being::setSpriteCards(const unsigned int slot, if (!filename.empty()) { - if (color.empty()) - color = info.getDyeColorsString(colorId); + color = info.getDyeColorsString(colorId); equipmentSprite = AnimatedSprite::delayedLoad( pathJoin(paths.getStringValue("sprites"), diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 46810c2cd..5038195d2 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -164,6 +164,7 @@ CharSelectDialog::CharSelectDialog(LoginData &data) : CharSelectDialog::~CharSelectDialog() { + mDeleteDialog = nullptr; } void CharSelectDialog::postInit() diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index d0284af94..0b4d550dd 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1741,7 +1741,7 @@ bool ChatWindow::resortChatLog(std::string line, tryRemoveColors); } } - else if ((localChatTab != nullptr) && channel.empty()) + else if (localChatTab != nullptr) { localChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors); } diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h index 215eba679..de64641fc 100644 --- a/src/net/tmwa/guildhandler.h +++ b/src/net/tmwa/guildhandler.h @@ -70,8 +70,7 @@ class GuildHandler final : public Net::GuildHandler void checkMaster() const override final; - void requestAlliance(const Being *const being) const override final - ; + void requestAlliance(const Being *const being) const override final; void requestAllianceResponse(const int beingId, const bool accept) const override final; @@ -85,8 +84,7 @@ class GuildHandler final : public Net::GuildHandler const int payRate, const std::string &name) const override final; - void requestOpposition(const Being *const being) const override final - ; + void requestOpposition(const Being *const being) const override final; void breakGuild(const std::string &name) const override final; diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index e4f603779..e5e7374fe 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -189,7 +189,7 @@ PRAGMACLANG6GCC(GCC diagnostic pop) outLength = bufferSize - strm.avail_out; (void) inflateEnd(&strm); - return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; + return Z_OK; } int inflateMemory(unsigned char *restrict const in, diff --git a/src/utils/gettexthelper.cpp b/src/utils/gettexthelper.cpp index 422c7d36f..9b8f16352 100644 --- a/src/utils/gettexthelper.cpp +++ b/src/utils/gettexthelper.cpp @@ -73,11 +73,8 @@ static std::string setLangEnv() putenv(const_cast<char*>(("LANGUAGE=" + lang).c_str())); #else // WIN32 - if (!lang.empty()) - { - setEnv("LANG", lang.c_str()); - setEnv("LANGUAGE", lang.c_str()); - } + setEnv("LANG", lang.c_str()); + setEnv("LANGUAGE", lang.c_str()); #endif // WIN32 } diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index c91dfd932..6ec7817ed 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -588,7 +588,7 @@ std::string combineDye3(std::string file, } return file.append("|").append(str); } - if (dye.empty() || file.empty()) + if (file.empty()) return file; return file.append("|").append(dye); } |