Skip to content

Commit

Permalink
Another minor change to address_cast.
Browse files Browse the repository at this point in the history
  • Loading branch information
angelfor3v3r committed Dec 18, 2024
1 parent c92d0df commit d82e927
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/safetyhook/utility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ template <typename T> constexpr void store(uint8_t* address, const T& value) {
}

template <typename T, typename U> constexpr T address_cast(U address) {
if constexpr (std::is_integral_v<T> && std::is_integral_v<decltype(address)>) {
if constexpr (std::is_integral_v<T> && std::is_integral_v<U>) {
return static_cast<T>(address);
} else {
return reinterpret_cast<T>(address);
Expand Down

0 comments on commit d82e927

Please sign in to comment.