1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +00:00

Use std::vector to collect ChunkIds to be removed

Cache does not have duplicated entries.
This commit is contained in:
elsid 2024-05-26 20:06:03 +02:00
parent b64069156d
commit b5a75ba96c
No known key found for this signature in database
GPG key ID: 4DE04C198CBA7625

View file

@ -898,10 +898,10 @@ namespace MWRender
if (mActiveGridOnly && !std::get<2>(id))
return;
if (intersects(id))
mCollected.insert(id);
mCollected.push_back(id);
}
const std::set<ChunkId>& getCollected() const { return mCollected; }
const std::vector<ChunkId>& getCollected() const { return mCollected; }
private:
bool intersects(ChunkId id) const
@ -914,7 +914,7 @@ namespace MWRender
bool mActiveGridOnly;
osg::Vec2f mPosition;
std::set<ChunkId> mCollected;
std::vector<ChunkId> mCollected;
};
}