Explorar o código

Change Ref<T> to allow non const access to ptr

Nana Sakisaka %!s(int64=2) %!d(string=hai) anos
pai
achega
48635729b9
Modificáronse 1 ficheiros con 3 adicións e 14 borrados
  1. 3 14
      include/godot_cpp/classes/ref.hpp

+ 3 - 14
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;
 	}