diff options
| author | Ruslan Mustakov | 2017-07-28 22:27:12 +0700 |
|---|---|---|
| committer | Ruslan Mustakov | 2017-07-28 22:51:17 +0700 |
| commit | 5804308c579866ee3992a168913743261e34d221 (patch) | |
| tree | bd96f8e8b5af35061176e5161013050739e0c683 /core/reference.h | |
| parent | 260d179d31972b82e1d604174ccf1663343bfa97 (diff) | |
| download | godot-5804308c579866ee3992a168913743261e34d221.tar.gz godot-5804308c579866ee3992a168913743261e34d221.tar.zst godot-5804308c579866ee3992a168913743261e34d221.zip | |
Diffstat (limited to 'core/reference.h')
| -rw-r--r-- | core/reference.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/reference.h b/core/reference.h index 4e2d6c36c..90f2791f4 100644 --- a/core/reference.h +++ b/core/reference.h @@ -330,7 +330,7 @@ struct PtrToArg<Ref<T> > { _FORCE_INLINE_ static Ref<T> convert(const void *p_ptr) { - return Ref<T>(reinterpret_cast<const T *>(p_ptr)); + return Ref<T>(const_cast<T *>(reinterpret_cast<const T *>(p_ptr))); } _FORCE_INLINE_ static void encode(Ref<T> p_val, const void *p_ptr) { @@ -355,7 +355,7 @@ struct PtrToArg<RefPtr> { _FORCE_INLINE_ static RefPtr convert(const void *p_ptr) { - return Ref<Reference>(reinterpret_cast<const Reference *>(p_ptr)).get_ref_ptr(); + return Ref<Reference>(const_cast<Reference *>(reinterpret_cast<const Reference *>(p_ptr))).get_ref_ptr(); } _FORCE_INLINE_ static void encode(RefPtr p_val, const void *p_ptr) { @@ -370,7 +370,7 @@ struct PtrToArg<const RefPtr &> { _FORCE_INLINE_ static RefPtr convert(const void *p_ptr) { - return Ref<Reference>(reinterpret_cast<const Reference *>(p_ptr)).get_ref_ptr(); + return Ref<Reference>(const_cast<Reference *>(reinterpret_cast<const Reference *>(p_ptr))).get_ref_ptr(); } }; |
