diff --git a/Source/Contents/ClientState.cpp b/Source/Contents/ClientState.cpp index e626d095..99d7ea6e 100644 --- a/Source/Contents/ClientState.cpp +++ b/Source/Contents/ClientState.cpp @@ -231,9 +231,9 @@ std::uint32_t CSession::ReadReplayMessenger(const std::vector& da return 0xFFFFFFFF; } - std::uint32_t offset = 6; ReplayBlockHeader header; header.Read(data.data()); + std::uint32_t offset = 6; if (4000 != header.id) { return 0xFFFFFFFF; } @@ -294,9 +294,9 @@ std::uint32_t CSession::ReadReplayItems(const std::vector& data) return 0xFFFFFFFF; } - std::uint32_t offset = 6; ReplayBlockHeader header; header.Read(data.data()); + std::uint32_t offset = 6; if (4500 != header.id) { return 0xFFFFFFFF; } @@ -440,9 +440,9 @@ std::uint32_t CSession::ReadReplayExtra(const std::vector& data) return 0xFFFFFFFF; } - std::uint32_t offset = 6; ReplayBlockHeader header; header.Read(data.data()); + std::uint32_t offset = 6; if (5500 != header.id) { return 0xFFFFFFFF; } @@ -866,9 +866,9 @@ std::uint32_t CSession::ReadReplayQuests(const std::vector& data) return 0xFFFFFFFF; } - std::uint32_t offset = 6; ReplayBlockHeader header; header.Read(data.data()); + std::uint32_t offset = 6; if (3500 != header.id) { return 0xFFFFFFFF; } @@ -913,9 +913,9 @@ std::uint32_t CSession::ReadReplayShortcuts(const std::vector& da return 0xFFFFFFFF; } - std::uint32_t offset = 6; ReplayBlockHeader header; header.Read(data.data()); + std::uint32_t offset = 6; if (7000 != header.id) { return 0xFFFFFFFF; } diff --git a/Source/Contents/Messenger/ClientMessenger.cpp b/Source/Contents/Messenger/ClientMessenger.cpp index 07b0f04f..2839f7e5 100644 --- a/Source/Contents/Messenger/ClientMessenger.cpp +++ b/Source/Contents/Messenger/ClientMessenger.cpp @@ -4047,18 +4047,18 @@ EquipmentPropertyDefinition* EquipmentProperties::CEquipmentPropertiesMgr::FindD // FUNCTION: fn_06185 int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown01BC(const int& first, const int& second, const unsigned int& third) { auto outer = this->unknown_01BC.find(first); - if (outer == this->unknown_01BC.end()) { + if (this->unknown_01BC.end() == outer) { return 0; } auto middle = outer->second.find(second); - if (middle == outer->second.end()) { + if (outer->second.end() == middle) { return 0; } if (third == 0 || third > middle->second.size()) { return 0; } auto inner = middle->second.find(third); - if (inner == middle->second.end()) { + if (middle->second.end() == inner) { return 0; } return static_cast(inner->second); @@ -6077,11 +6077,11 @@ void CGameMode::ReceiveShopItemList(const unsigned char* data) { // FUNCTION: fn_06173 int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown01DC(const int& first, const int& second, const int& third) { auto outer = this->unknown_01DC.find(first); - if (outer != this->unknown_01DC.end()) { + if (this->unknown_01DC.end() != outer) { auto middle = outer->second.find(second); - if (middle != outer->second.end()) { + if (outer->second.end() != middle) { auto inner = middle->second.find(third); - if (inner != middle->second.end()) { + if (middle->second.end() != inner) { return inner->second.value; } } diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 143adf04..94b233b5 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -1363,7 +1363,7 @@ void UIWindowMgr::SendMsgToNamedWindow(const char* name) { // OFFSET: 0x00AAA280 // FUNCTION: fn_17267 void UIWindowMgr::SetWindows189Visible(unsigned char show) { - for (auto it = this->rendered.begin(); it != this->rendered.end(); ++it) { + for (auto it = this->rendered.begin(); this->rendered.end() != it; ++it) { if ((*it)->geometry.id == 189) { (*it)->Show(show); }