Skip to content

Commit

Permalink
Rename ot mStatic
Browse files Browse the repository at this point in the history
  • Loading branch information
Assumeru committed Jun 5, 2024
1 parent ca6baed commit 330f5de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions apps/openmw/mwworld/store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,15 +386,15 @@ namespace MWWorld
auto mapping = mMappings.find(PluginIndex{ plugin, index });
if (mapping == mMappings.end())
return nullptr;
auto texture = mTextures.find(mapping->second);
if (texture == mTextures.end())
auto texture = mStatic.find(mapping->second);
if (texture == mStatic.end())
return nullptr;
return &texture->second;
}

size_t Store<ESM::LandTexture>::getSize() const
{
return mTextures.size();
return mStatic.size();
}

RecordId Store<ESM::LandTexture>::load(ESM::ESMReader& esm)
Expand All @@ -408,7 +408,7 @@ namespace MWWorld

if (!isDeleted)
{
mTextures[lt.mId] = std::move(lt.mTexture);
mStatic[lt.mId] = std::move(lt.mTexture);
mMappings.emplace(PluginIndex{ plugin, lt.mIndex }, lt.mId);
}

Expand All @@ -417,7 +417,7 @@ namespace MWWorld

bool Store<ESM::LandTexture>::eraseStatic(const ESM::RefId& id)
{
mTextures.erase(id);
mStatic.erase(id);
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion apps/openmw/mwworld/store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ namespace MWWorld
class Store<ESM::LandTexture> : public DynamicStore
{
using PluginIndex = std::pair<int, std::uint32_t>; // This is essentially a FormId
std::unordered_map<ESM::RefId, std::string> mTextures;
std::unordered_map<ESM::RefId, std::string> mStatic;
std::map<PluginIndex, ESM::RefId> mMappings;

public:
Expand Down

0 comments on commit 330f5de

Please sign in to comment.