Get rid of unnecessary find

0.6.3
Andrei Kortunov 7 years ago
parent 1dd36329a3
commit 17222eb821

@ -1070,12 +1070,10 @@ namespace MWWorld
if (search(marker.first) == 0) if (search(marker.first) == 0)
{ {
ESM::Static newMarker = ESM::Static(marker.first, marker.second); ESM::Static newMarker = ESM::Static(marker.first, marker.second);
mStatic.insert(std::make_pair(marker.first, newMarker)); std::pair<typename Static::iterator, bool> ret = mStatic.insert(std::make_pair(marker.first, newMarker));
if (ret.first != mStatic.end())
std::map<std::string, ESM::Static>::iterator found = mStatic.find(marker.first);
if (found != mStatic.end())
{ {
mShared.push_back(&found->second); mShared.push_back(&ret.first->second);
} }
} }
} }

Loading…
Cancel
Save