mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
shared_ptr.hpp: minor fixup
This commit is contained in:
parent
b7c579adf9
commit
71e16bfac3
1 changed files with 2 additions and 2 deletions
|
@ -30,13 +30,13 @@ namespace stx
|
||||||
}
|
}
|
||||||
else if constexpr (std::is_convertible_v<U*, T*>)
|
else if constexpr (std::is_convertible_v<U*, T*>)
|
||||||
{
|
{
|
||||||
const auto u = &sample<U>;
|
const auto u = std::addressof(sample<U>);
|
||||||
const volatile void* x = u;
|
const volatile void* x = u;
|
||||||
return static_cast<T*>(u) == x;
|
return static_cast<T*>(u) == x;
|
||||||
}
|
}
|
||||||
else if constexpr (std::is_convertible_v<T*, U*>)
|
else if constexpr (std::is_convertible_v<T*, U*>)
|
||||||
{
|
{
|
||||||
const auto t = &sample<T>;
|
const auto t = std::addressof(sample<T>);
|
||||||
const volatile void* x = t;
|
const volatile void* x = t;
|
||||||
return static_cast<U*>(t) == x;
|
return static_cast<U*>(t) == x;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue