mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -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
|
@ -373,9 +373,9 @@ namespace ams::cfg {
|
|||
.override_key = g_default_override_key,
|
||||
.cheat_enable_key = g_default_cheat_enable_key,
|
||||
};
|
||||
std::memset(&config.locale, 0xCC, sizeof(config.locale));
|
||||
std::memset(std::addressof(config.locale), 0xCC, sizeof(config.locale));
|
||||
|
||||
ParseIniFile(ContentSpecificIniHandler, path, &config);
|
||||
ParseIniFile(ContentSpecificIniHandler, path, std::addressof(config));
|
||||
return config;
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ namespace ams::cfg {
|
|||
RefreshOverrideConfiguration();
|
||||
|
||||
/* If we can't read the key state, don't override anything. */
|
||||
if (R_FAILED(hid::GetKeysHeld(&status.keys_held))) {
|
||||
if (R_FAILED(hid::GetKeysHeld(std::addressof(status.keys_held)))) {
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace ams::cfg {
|
|||
Result CheckSdCardServicesReady() {
|
||||
for (size_t i = 0; i < NumRequiredServicesForSdCardAccess; i++) {
|
||||
bool service_present = false;
|
||||
R_TRY(sm::HasService(&service_present, RequiredServicesForSdCardAccess[i]));
|
||||
R_TRY(sm::HasService(std::addressof(service_present), RequiredServicesForSdCardAccess[i]));
|
||||
if (!service_present) {
|
||||
return fs::ResultSdCardNotPresent();
|
||||
}
|
||||
|
@ -54,14 +54,14 @@ namespace ams::cfg {
|
|||
|
||||
Result TryInitializeSdCard() {
|
||||
R_TRY(CheckSdCardServicesReady());
|
||||
R_ABORT_UNLESS(fsOpenSdCardFileSystem(&g_sd_card_filesystem));
|
||||
R_ABORT_UNLESS(fsOpenSdCardFileSystem(std::addressof(g_sd_card_filesystem)));
|
||||
g_sd_card_initialized = true;
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
void InitializeSdCard() {
|
||||
WaitSdCardServicesReadyImpl();
|
||||
R_ABORT_UNLESS(fsOpenSdCardFileSystem(&g_sd_card_filesystem));
|
||||
R_ABORT_UNLESS(fsOpenSdCardFileSystem(std::addressof(g_sd_card_filesystem)));
|
||||
g_sd_card_initialized = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue