mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-27 13:41:34 +00:00
do not emplace_back to our mLandTextures; instead use the heavy handed resize to be explicit about what we intend to do; resolves issue found here: https://github.com/OpenMW/openmw/pull/3220#issuecomment-964650167
This commit is contained in:
parent
5afd6b0e46
commit
700bace24c
2 changed files with 2 additions and 3 deletions
|
@ -153,7 +153,7 @@ void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener)
|
||||||
// Land texture loading needs to use a separate internal store for each plugin.
|
// Land texture loading needs to use a separate internal store for each plugin.
|
||||||
// We set the number of plugins here so we can properly verify if valid plugin
|
// We set the number of plugins here so we can properly verify if valid plugin
|
||||||
// indices are being passed to the LandTexture Store retrieval methods.
|
// indices are being passed to the LandTexture Store retrieval methods.
|
||||||
mLandTextures.addPlugin();
|
mLandTextures.resize(esm.getIndex()+1);
|
||||||
|
|
||||||
// Loop through all records
|
// Loop through all records
|
||||||
while(esm.hasMoreRecs())
|
while(esm.hasMoreRecs())
|
||||||
|
|
|
@ -222,8 +222,7 @@ namespace MWWorld
|
||||||
const ESM::LandTexture *search(size_t index, size_t plugin) const;
|
const ESM::LandTexture *search(size_t index, size_t plugin) const;
|
||||||
const ESM::LandTexture *find(size_t index, size_t plugin) const;
|
const ESM::LandTexture *find(size_t index, size_t plugin) const;
|
||||||
|
|
||||||
/// Resize the internal store to hold another plugin.
|
void resize(size_t num) { mStatic.resize(num); }
|
||||||
void addPlugin() { mStatic.emplace_back(); }
|
|
||||||
|
|
||||||
size_t getSize() const override;
|
size_t getSize() const override;
|
||||||
size_t getSize(size_t plugin) const;
|
size_t getSize(size_t plugin) const;
|
||||||
|
|
Loading…
Reference in a new issue