From 20cfdd4b433fb90a64a08a540e50deaae0181b58 Mon Sep 17 00:00:00 2001 From: Emanuel Guevel Date: Thu, 8 May 2014 13:47:54 +0200 Subject: [PATCH] Move LiveCellRefBase ctor where it belongs to --- apps/openmw/mwworld/livecellref.cpp | 5 +++++ apps/openmw/mwworld/ptr.cpp | 11 ++--------- apps/openmw/mwworld/ptr.hpp | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwworld/livecellref.cpp b/apps/openmw/mwworld/livecellref.cpp index 4a610b45c..1b13e3803 100644 --- a/apps/openmw/mwworld/livecellref.cpp +++ b/apps/openmw/mwworld/livecellref.cpp @@ -10,6 +10,11 @@ #include "class.hpp" #include "esmstore.hpp" +MWWorld::LiveCellRefBase::LiveCellRefBase(std::string type, const ESM::CellRef &cref) + : mClass(&Class::get(type)), mRef(cref), mData(mRef) +{ +} + void MWWorld::LiveCellRefBase::loadImp (const ESM::ObjectState& state) { mRef = state.mRef; diff --git a/apps/openmw/mwworld/ptr.cpp b/apps/openmw/mwworld/ptr.cpp index 3920a3e79..b047ba47c 100644 --- a/apps/openmw/mwworld/ptr.cpp +++ b/apps/openmw/mwworld/ptr.cpp @@ -5,14 +5,7 @@ #include "containerstore.hpp" #include "class.hpp" - - -/* This shouldn't really be here. */ -MWWorld::LiveCellRefBase::LiveCellRefBase(std::string type, const ESM::CellRef &cref) - : mClass(&Class::get(type)), mRef(cref), mData(mRef) -{ -} - +#include "livecellref.hpp" const std::string& MWWorld::Ptr::getTypeName() const { @@ -59,4 +52,4 @@ MWWorld::ContainerStore *MWWorld::Ptr::getContainerStore() const MWWorld::Ptr::operator const void *() { return mRef; -} \ No newline at end of file +} diff --git a/apps/openmw/mwworld/ptr.hpp b/apps/openmw/mwworld/ptr.hpp index b83069283..f4696d3b3 100644 --- a/apps/openmw/mwworld/ptr.hpp +++ b/apps/openmw/mwworld/ptr.hpp @@ -7,12 +7,12 @@ #include #include "cellreflist.hpp" -#include "livecellref.hpp" namespace MWWorld { class ContainerStore; class CellStore; + class LiveCellRefBase; /// \brief Pointer to a LiveCellRef