Skip to content

Commit

Permalink
fix: Cast breaking with const/volatile
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashi committed Apr 23, 2022
1 parent d4fdf46 commit df8f648
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Code/client/Games/Skyrim/RTTI.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ extern const VersionDbPtr<TDynamicCast> DynamicCast;
template<class T, class U>
T* Cast(U* apPtr)
{
return reinterpret_cast<T*>(internal::DynamicCast.Get()((void*)apPtr, 0, internal::RttiLocator<U>::Get(), internal::RttiLocator<T>::Get(), 0));
return reinterpret_cast<T*>(internal::DynamicCast.Get()((void*)apPtr, 0,
internal::RttiLocator<std::remove_cv_t<U>>::Get(),
internal::RttiLocator<std::remove_cv_t<T>>::Get(), 0));
}


Expand Down

0 comments on commit df8f648

Please sign in to comment.