From d875ac894756acb59d473fc7ad84a192be9a7355 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 19 Nov 2024 18:04:30 +0000 Subject: [PATCH] Add: const operator->() for ScirptObjectRef. --- src/script/api/script_object.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp index 10ad2aefd9..842966758c 100644 --- a/src/script/api/script_object.hpp +++ b/src/script/api/script_object.hpp @@ -473,6 +473,15 @@ public: { 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 */