mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-17 08:34:23 -04:00
ams: convert to util::ConstructAt where appropriate
This commit is contained in:
parent
d84dcb653d
commit
c99ce36d7d
4 changed files with 7 additions and 12 deletions
|
@ -40,12 +40,10 @@ namespace ams::fs {
|
|||
|
||||
/* Setup the storage. */
|
||||
/* NOTE: This owns the file, and so on failure it will be closed appropriately. */
|
||||
std::construct_at(GetPointer(g_stratosphere_romfs_storage), stratosphere_romfs_file, true);
|
||||
auto storage_guard = SCOPE_GUARD { std::destroy_at(GetPointer(g_stratosphere_romfs_storage)); };
|
||||
auto storage_guard = util::ConstructAtGuarded(g_stratosphere_romfs_storage, stratosphere_romfs_file, true);
|
||||
|
||||
/* Create the filesystem. */
|
||||
std::construct_at(GetPointer(g_stratosphere_romfs_fs));
|
||||
auto fs_guard = SCOPE_GUARD { std::destroy_at(GetPointer(g_stratosphere_romfs_fs)); };
|
||||
auto fs_guard = util::ConstructAtGuarded(g_stratosphere_romfs_fs);
|
||||
|
||||
/* Initialize the filesystem. */
|
||||
R_TRY(GetReference(g_stratosphere_romfs_fs).Initialize(GetPointer(g_stratosphere_romfs_storage), nullptr, 0, false));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue