mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 13:14:15 -04:00
ams: replace most remaining operator & with std::addressof
This commit is contained in:
parent
ce8aacef21
commit
1ab0bd1765
109 changed files with 587 additions and 586 deletions
|
@ -40,19 +40,17 @@ namespace ams::sm::impl {
|
|||
TipcService srv;
|
||||
{
|
||||
std::scoped_lock lk(GetPerThreadSessionMutex());
|
||||
R_ABORT_UNLESS(smAtmosphereOpenSession(&srv));
|
||||
R_ABORT_UNLESS(smAtmosphereOpenSession(std::addressof(srv)));
|
||||
}
|
||||
{
|
||||
ON_SCOPE_EXIT { smAtmosphereCloseSession(&srv); };
|
||||
return f(&srv);
|
||||
ON_SCOPE_EXIT { smAtmosphereCloseSession(std::addressof(srv)); };
|
||||
return f(std::addressof(srv));
|
||||
}
|
||||
}
|
||||
|
||||
NX_CONSTEXPR SmServiceName ConvertName(sm::ServiceName name) {
|
||||
constexpr ALWAYS_INLINE SmServiceName ConvertName(sm::ServiceName name) {
|
||||
static_assert(sizeof(SmServiceName) == sizeof(sm::ServiceName));
|
||||
SmServiceName ret = {};
|
||||
__builtin_memcpy(&ret, &name, sizeof(sm::ServiceName));
|
||||
return ret;
|
||||
return std::bit_cast<SmServiceName>(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue