Skip to content

Commit

Permalink
commit recommended fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yamaken93 committed Sep 16, 2021
1 parent 35f4722 commit fe024ba
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,8 @@ void Items::parseItemNode(const pugi::xml_node& itemNode, uint16_t id)

if (!it.name.empty()) {
std::string lowerCaseName = asLowerCaseString(it.name);
auto result = nameToItems.find(lowerCaseName);
if (result == nameToItems.end()) {
nameToItems.insert({ std::move(lowerCaseName), id });
if (nameToItems.find(lowerCaseName) == nameToItems.end()) {
nameToItems.emplace(std::move(lowerCaseName), id);
}
}

Expand Down

0 comments on commit fe024ba

Please sign in to comment.