[olympic,nostalgia] Cleanup some reinterpret_casts

This commit is contained in:
2023-12-14 23:39:30 -06:00
parent 3a781f6704
commit 13ddbd981e
4 changed files with 9 additions and 9 deletions

View File

@ -81,7 +81,7 @@ ox::Result<keel::AssetRef<T>> readObjNoCache(
ox::CRStringView assetId) noexcept {
if constexpr(ox::preloadable<T>::value) {
oxRequire(addr, getPreloadAddr(ctx, assetId));
return keel::AssetRef<T>(reinterpret_cast<const T*>(addr));
return keel::AssetRef<T>(std::bit_cast<const T*>(uintptr_t{addr}));
} else {
return OxError(1);
}
@ -141,7 +141,7 @@ ox::Result<keel::AssetRef<T>> readObj(
#else
if constexpr(ox::preloadable<T>::value) {
oxRequire(addr, getPreloadAddr(ctx, file));
return keel::AssetRef<T>(reinterpret_cast<const T*>(addr));
return keel::AssetRef<T>(std::bit_cast<const T*>(uintptr_t{addr}));
} else {
return OxError(1);
}