Rename ot mStatic

esm4-texture
Evil Eye 7 months ago
parent ca6baed366
commit 330f5de78d

@ -386,15 +386,15 @@ namespace MWWorld
auto mapping = mMappings.find(PluginIndex{ plugin, index }); auto mapping = mMappings.find(PluginIndex{ plugin, index });
if (mapping == mMappings.end()) if (mapping == mMappings.end())
return nullptr; return nullptr;
auto texture = mTextures.find(mapping->second); auto texture = mStatic.find(mapping->second);
if (texture == mTextures.end()) if (texture == mStatic.end())
return nullptr; return nullptr;
return &texture->second; return &texture->second;
} }
size_t Store<ESM::LandTexture>::getSize() const size_t Store<ESM::LandTexture>::getSize() const
{ {
return mTextures.size(); return mStatic.size();
} }
RecordId Store<ESM::LandTexture>::load(ESM::ESMReader& esm) RecordId Store<ESM::LandTexture>::load(ESM::ESMReader& esm)
@ -408,7 +408,7 @@ namespace MWWorld
if (!isDeleted) if (!isDeleted)
{ {
mTextures[lt.mId] = std::move(lt.mTexture); mStatic[lt.mId] = std::move(lt.mTexture);
mMappings.emplace(PluginIndex{ plugin, lt.mIndex }, lt.mId); mMappings.emplace(PluginIndex{ plugin, lt.mIndex }, lt.mId);
} }
@ -417,7 +417,7 @@ namespace MWWorld
bool Store<ESM::LandTexture>::eraseStatic(const ESM::RefId& id) bool Store<ESM::LandTexture>::eraseStatic(const ESM::RefId& id)
{ {
mTextures.erase(id); mStatic.erase(id);
return true; return true;
} }

@ -256,7 +256,7 @@ namespace MWWorld
class Store<ESM::LandTexture> : public DynamicStore class Store<ESM::LandTexture> : public DynamicStore
{ {
using PluginIndex = std::pair<int, std::uint32_t>; // This is essentially a FormId 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; std::map<PluginIndex, ESM::RefId> mMappings;
public: public:

Loading…
Cancel
Save