diff --git a/apps/esmtool/esmtool.cpp b/apps/esmtool/esmtool.cpp index dd9ed648c8..06348e949c 100644 --- a/apps/esmtool/esmtool.cpp +++ b/apps/esmtool/esmtool.cpp @@ -410,7 +410,6 @@ int load(Arguments& info) { rec = new Creature(); Creature& b = *(Creature*)rec; - b.setID(id); b.load(esm); if(quiet) break; cout << " Name: " << b.name << endl; diff --git a/apps/openmw/mwclass/creature.cpp b/apps/openmw/mwclass/creature.cpp index 7270fd22b9..8a5b149ff1 100644 --- a/apps/openmw/mwclass/creature.cpp +++ b/apps/openmw/mwclass/creature.cpp @@ -65,7 +65,7 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - return ref->base->mId; + return ref->base->getId(); } void Creature::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const diff --git a/apps/openmw/mwclass/npc.cpp b/apps/openmw/mwclass/npc.cpp index 83a94d27d1..04ac31f984 100644 --- a/apps/openmw/mwclass/npc.cpp +++ b/apps/openmw/mwclass/npc.cpp @@ -88,7 +88,7 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - return ref->base->mId; + return ref->base->getId(); } void Npc::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const diff --git a/components/esm/loadcrea.cpp b/components/esm/loadcrea.cpp index 7b84a7f296..259d37b4a1 100644 --- a/components/esm/loadcrea.cpp +++ b/components/esm/loadcrea.cpp @@ -2,11 +2,6 @@ namespace ESM { -void Creature::setID(const std::string& id) -{ - mId = id; -} - void Creature::load(ESMReader &esm) { model = esm.getHNString("MODL"); diff --git a/components/esm/loadcrea.hpp b/components/esm/loadcrea.hpp index 3035003cf8..348c14b234 100644 --- a/components/esm/loadcrea.hpp +++ b/components/esm/loadcrea.hpp @@ -63,9 +63,6 @@ struct Creature : public Record // Defined in loadcont.hpp InventoryList inventory; - std::string mId; - - void setID(const std::string& id); void load(ESMReader &esm); void save(ESMWriter &esm); diff --git a/components/esm/loadnpc.cpp b/components/esm/loadnpc.cpp index 34b5e69ed1..b689ba5e84 100644 --- a/components/esm/loadnpc.cpp +++ b/components/esm/loadnpc.cpp @@ -3,11 +3,6 @@ namespace ESM { -void NPC::setID(const std::string& id) -{ - mId = id; -} - void NPC::load(ESMReader &esm) { npdt52.gold = -10; diff --git a/components/esm/loadnpc.hpp b/components/esm/loadnpc.hpp index 3f8a60304c..13ee9ef6d7 100644 --- a/components/esm/loadnpc.hpp +++ b/components/esm/loadnpc.hpp @@ -100,10 +100,9 @@ struct NPC : public Record std::string name, model, race, cls, faction, script, hair, head; // body parts - std::string mId; + //std::string mId; // Implementation moved to load_impl.cpp - void setID(const std::string& id); void load(ESMReader &esm); void save(ESMWriter &esm); diff --git a/components/esm/record.hpp b/components/esm/record.hpp index d273b175ab..dfecab7b93 100644 --- a/components/esm/record.hpp +++ b/components/esm/record.hpp @@ -64,7 +64,7 @@ public: virtual void load(ESMReader& esm) = 0; virtual void save(ESMWriter& esm) = 0; - std::string getId() { return m_id; } + std::string getId() const { return m_id; } void setId(const std::string& in) { m_id = in; } virtual int getName() = 0; diff --git a/components/esm_store/reclists.hpp b/components/esm_store/reclists.hpp index bc3b676a21..22bb55b52c 100644 --- a/components/esm_store/reclists.hpp +++ b/components/esm_store/reclists.hpp @@ -104,7 +104,7 @@ namespace ESMS void load(ESMReader &esm, const std::string &id) { std::string id2 = toLower (id); - list[id2].setID(id2); + list[id2].setId(id2); list[id2].load(esm); }