mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 13:23:52 +00:00
Constify some RecordPtrT methods
This commit is contained in:
parent
395a7600fd
commit
8e324c90dc
1 changed files with 7 additions and 4 deletions
|
@ -71,18 +71,21 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Look up the actual object from the index
|
/// Look up the actual object from the index
|
||||||
X* getPtr()
|
X* getPtr() const
|
||||||
{
|
{
|
||||||
assert(ptr != NULL);
|
assert(ptr != NULL);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
X& get() { return *getPtr(); }
|
X& get() const
|
||||||
|
{ return *getPtr(); }
|
||||||
|
|
||||||
/// Syntactic sugar
|
/// Syntactic sugar
|
||||||
X* operator->() { return getPtr(); }
|
X* operator->() const
|
||||||
|
{ return getPtr(); }
|
||||||
|
|
||||||
/// Pointers are allowed to be empty
|
/// Pointers are allowed to be empty
|
||||||
bool empty() { return ptr == NULL; }
|
bool empty() const
|
||||||
|
{ return ptr == NULL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A list of references to other records. These are read as a list,
|
/** A list of references to other records. These are read as a list,
|
||||||
|
|
Loading…
Reference in a new issue