mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 14:45:37 +00:00
Get rid of unnecessary find
This commit is contained in:
parent
1dd36329a3
commit
17222eb821
1 changed files with 3 additions and 5 deletions
|
@ -1070,12 +1070,10 @@ namespace MWWorld
|
|||
if (search(marker.first) == 0)
|
||||
{
|
||||
ESM::Static newMarker = ESM::Static(marker.first, marker.second);
|
||||
mStatic.insert(std::make_pair(marker.first, newMarker));
|
||||
|
||||
std::map<std::string, ESM::Static>::iterator found = mStatic.find(marker.first);
|
||||
if (found != mStatic.end())
|
||||
std::pair<typename Static::iterator, bool> ret = mStatic.insert(std::make_pair(marker.first, newMarker));
|
||||
if (ret.first != mStatic.end())
|
||||
{
|
||||
mShared.push_back(&found->second);
|
||||
mShared.push_back(&ret.first->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue