Skip to content

Commit

Permalink
Merge pull request #1116 from saki7/Ref-allow-non-const-access
Browse files Browse the repository at this point in the history
Change Ref<T> to allow non const access to ptr
  • Loading branch information
dsnopek authored May 25, 2023
2 parents 8052f81 + 4863572 commit 0d0d5a6
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions include/godot_cpp/classes/ref.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,26 +88,15 @@ class Ref {
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;
}

Expand Down

0 comments on commit 0d0d5a6

Please sign in to comment.