From 5ef93778f62cb52d0fbf9ca01b2a43444c35b200 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sat, 5 Dec 2020 03:31:12 -0800 Subject: [PATCH] fs: move file storage to common --- libraries/libstratosphere/include/stratosphere/fs.hpp | 2 +- .../include/stratosphere/fs/{ => common}/fs_file_storage.hpp | 0 .../stratosphere/ncm/ncm_submission_package_install_task.hpp | 2 +- .../source/fs/{ => common}/fs_file_storage.cpp | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) rename libraries/libstratosphere/include/stratosphere/fs/{ => common}/fs_file_storage.hpp (100%) rename libraries/libstratosphere/source/fs/{ => common}/fs_file_storage.cpp (97%) diff --git a/libraries/libstratosphere/include/stratosphere/fs.hpp b/libraries/libstratosphere/include/stratosphere/fs.hpp index 176588fe7..413d23b28 100644 --- a/libraries/libstratosphere/include/stratosphere/fs.hpp +++ b/libraries/libstratosphere/include/stratosphere/fs.hpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/libraries/libstratosphere/include/stratosphere/fs/fs_file_storage.hpp b/libraries/libstratosphere/include/stratosphere/fs/common/fs_file_storage.hpp similarity index 100% rename from libraries/libstratosphere/include/stratosphere/fs/fs_file_storage.hpp rename to libraries/libstratosphere/include/stratosphere/fs/common/fs_file_storage.hpp diff --git a/libraries/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp b/libraries/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp index 91f8b2001..790590c23 100644 --- a/libraries/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp +++ b/libraries/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #pragma once -#include +#include #include namespace ams::ncm { diff --git a/libraries/libstratosphere/source/fs/fs_file_storage.cpp b/libraries/libstratosphere/source/fs/common/fs_file_storage.cpp similarity index 97% rename from libraries/libstratosphere/source/fs/fs_file_storage.cpp rename to libraries/libstratosphere/source/fs/common/fs_file_storage.cpp index d0401bb3d..1d6bdfd13 100644 --- a/libraries/libstratosphere/source/fs/fs_file_storage.cpp +++ b/libraries/libstratosphere/source/fs/common/fs_file_storage.cpp @@ -19,7 +19,7 @@ namespace ams::fs { Result FileStorage::UpdateSize() { R_SUCCEED_IF(this->size != InvalidSize); - return this->base_file->GetSize(&this->size); + return this->base_file->GetSize(std::addressof(this->size)); } Result FileStorage::Read(s64 offset, void *buffer, size_t size) { @@ -36,7 +36,7 @@ namespace ams::fs { R_UNLESS(IStorage::CheckAccessRange(offset, size, this->size), fs::ResultOutOfRange()); size_t read_size; - return this->base_file->Read(&read_size, offset, buffer, size); + return this->base_file->Read(std::addressof(read_size), offset, buffer, size); } Result FileStorage::Write(s64 offset, const void *buffer, size_t size) {