From 97f421df8a5a3f6e4803001af8014355128d8523 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 8 Jun 2013 15:50:36 +0200 Subject: [PATCH] simplifying CSMWorld::CellRef --- apps/opencs/model/world/ref.cpp | 15 +++++++++------ apps/opencs/model/world/ref.hpp | 3 +-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/opencs/model/world/ref.cpp b/apps/opencs/model/world/ref.cpp index a0b7165533..e25a1471ef 100644 --- a/apps/opencs/model/world/ref.cpp +++ b/apps/opencs/model/world/ref.cpp @@ -3,12 +3,15 @@ #include "cell.hpp" -void CSMWorld::CellRef::load (ESM::ESMReader &esm, Cell& cell, const std::string& id) +void CSMWorld::CellRef::load (ESM::ESMReader &esm) { - mId = id; + // The CellRef is not loaded here. Because of the unfortunate way how the ESMReader and the cell + // record is constructed, we do not have enough context in this function to perform a load. - cell.getNextRef (esm, *this); +// mId = id; - if (!mDeleted) - cell.addRef (mId); -} \ No newline at end of file +// cell.getNextRef (esm, *this); + +// if (!mDeleted) +// cell.addRef (mId); +} diff --git a/apps/opencs/model/world/ref.hpp b/apps/opencs/model/world/ref.hpp index 5b3e87f840..bf665b77a4 100644 --- a/apps/opencs/model/world/ref.hpp +++ b/apps/opencs/model/world/ref.hpp @@ -17,8 +17,7 @@ namespace CSMWorld { std::string mId; - void load (ESM::ESMReader &esm, Cell& cell, const std::string& id); - ///< Load cell ref and register it with \a cell. + void load (ESM::ESMReader &esm); }; }