Get rid of easily removable uses of const_cast

This commit is contained in:
rune-scape 2024-07-29 21:23:12 -07:00 committed by rune-scape
parent 893bbdfde8
commit d58b2e879f
69 changed files with 342 additions and 306 deletions

View file

@ -222,7 +222,7 @@ struct PtrToArg<Ref<T>> {
return Ref<T>();
}
// p_ptr points to a RefCounted object
return Ref<T>(const_cast<T *>(*reinterpret_cast<T *const *>(p_ptr)));
return Ref<T>(*reinterpret_cast<T *const *>(p_ptr));
}
typedef Ref<T> EncodeT;