mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
42 lines
684 B
C++
42 lines
684 B
C++
|
|
#include "ptr.hpp"
|
|
|
|
#include <cassert>
|
|
|
|
#include "containerstore.hpp"
|
|
|
|
const std::string MWWorld::Ptr::sEmptyString;
|
|
|
|
ESM::CellRef& MWWorld::Ptr::getCellRef() const
|
|
{
|
|
assert(mRef);
|
|
|
|
if (mContainerStore)
|
|
mContainerStore->flagAsModified();
|
|
|
|
return mRef->mRef;
|
|
}
|
|
|
|
MWWorld::RefData& MWWorld::Ptr::getRefData() const
|
|
{
|
|
assert(mRef);
|
|
|
|
if (mContainerStore)
|
|
mContainerStore->flagAsModified();
|
|
|
|
return mRef->mData;
|
|
}
|
|
|
|
void MWWorld::Ptr::setContainerStore (ContainerStore *store)
|
|
{
|
|
assert (store);
|
|
assert (!mCell);
|
|
|
|
mContainerStore = store;
|
|
}
|
|
|
|
MWWorld::ContainerStore *MWWorld::Ptr::getContainerStore() const
|
|
{
|
|
return mContainerStore;
|
|
}
|