From 1aa8a27f17c43e8540c95f3893df08f706977d08 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 --- libstratosphere/include/stratosphere/fs.hpp | 2 +- .../include/stratosphere/fs/{ => common}/fs_file_storage.hpp | 0 .../stratosphere/ncm/ncm_submission_package_install_task.hpp | 2 +- libstratosphere/source/fs/{ => common}/fs_file_storage.cpp | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) rename libstratosphere/include/stratosphere/fs/{ => common}/fs_file_storage.hpp (100%) rename libstratosphere/source/fs/{ => common}/fs_file_storage.cpp (97%) diff --git a/libstratosphere/include/stratosphere/fs.hpp b/libstratosphere/include/stratosphere/fs.hpp index 176588fe..413d23b2 100644 --- a/libstratosphere/include/stratosphere/fs.hpp +++ b/libstratosphere/include/stratosphere/fs.hpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/libstratosphere/include/stratosphere/fs/fs_file_storage.hpp b/libstratosphere/include/stratosphere/fs/common/fs_file_storage.hpp similarity index 100% rename from libstratosphere/include/stratosphere/fs/fs_file_storage.hpp rename to libstratosphere/include/stratosphere/fs/common/fs_file_storage.hpp diff --git a/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp b/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp index 91f8b200..790590c2 100644 --- a/libstratosphere/include/stratosphere/ncm/ncm_submission_package_install_task.hpp +++ b/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/libstratosphere/source/fs/fs_file_storage.cpp b/libstratosphere/source/fs/common/fs_file_storage.cpp similarity index 97% rename from libstratosphere/source/fs/fs_file_storage.cpp rename to libstratosphere/source/fs/common/fs_file_storage.cpp index d0401bb3..1d6bdfd1 100644 --- a/libstratosphere/source/fs/fs_file_storage.cpp +++ b/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) {