mirror of https://github.com/OpenTTD/OpenTTD
Add: const operator->() for ScirptObjectRef.
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