mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-15 16:45:08 +01:00
Add: const operator->() for ScirptObjectRef.
This commit is contained in:
parent
26ae50baf9
commit
d875ac8947
@ -473,6 +473,15 @@ public:
|
|||||||
{
|
{
|
||||||
return this->data;
|
return this->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The arrow operator on this reference returns the reference counted object.
|
||||||
|
* @return Pointer to the underlying object.
|
||||||
|
*/
|
||||||
|
const T *operator->() const
|
||||||
|
{
|
||||||
|
return this->data;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* SCRIPT_OBJECT_HPP */
|
#endif /* SCRIPT_OBJECT_HPP */
|
||||||
|
Loading…
Reference in New Issue
Block a user