summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/classes
diff options
context:
space:
mode:
authorNana Sakisaka <1901813+saki7@users.noreply.github.com>2023-05-17 19:24:09 +0900
committerNana Sakisaka <1901813+saki7@users.noreply.github.com>2023-05-17 19:24:09 +0900
commit48635729b990b6a84e2e2bb7334b2b4ca2c28ee8 (patch)
tree6643cd90f753aec7c4bcfad74567c37b61eb6c18 /include/godot_cpp/classes
parent1c18413de00f1a6265b2b6c30175b2f6a434b574 (diff)
downloadredot-cpp-48635729b990b6a84e2e2bb7334b2b4ca2c28ee8.tar.gz
Change Ref<T> to allow non const access to ptr
Diffstat (limited to 'include/godot_cpp/classes')
-rw-r--r--include/godot_cpp/classes/ref.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/include/godot_cpp/classes/ref.hpp b/include/godot_cpp/classes/ref.hpp
index 301f847..90d85e5 100644
--- a/include/godot_cpp/classes/ref.hpp
+++ b/include/godot_cpp/classes/ref.hpp
@@ -88,26 +88,15 @@ public:
return reference != p_r.reference;
}
- _FORCE_INLINE_ T *operator->() {
+ _FORCE_INLINE_ T *operator*() const {
return reference;
}
- _FORCE_INLINE_ T *operator*() {
+ _FORCE_INLINE_ T *operator->() const {
return reference;
}
- _FORCE_INLINE_ const T *operator->() const {
- return reference;
- }
-
- _FORCE_INLINE_ const T *ptr() const {
- return reference;
- }
- _FORCE_INLINE_ T *ptr() {
- return reference;
- }
-
- _FORCE_INLINE_ const T *operator*() const {
+ _FORCE_INLINE_ T *ptr() const {
return reference;
}