diff options
| author | 2019-04-04 21:29:24 -0400 | |
|---|---|---|
| committer | 2019-04-05 11:04:01 -0400 | |
| commit | c05c8a7a065a60f586fe617bf6af0814064eb903 (patch) | |
| tree | c1af6d1714f08cba21f3c1089df5dfcbf55c03b7 /src/core/file_sys | |
| parent | service/fsp_srv: Remove unnecessary unknown member in OpenSaveDataFileSystem (diff) | |
| download | yuzu-c05c8a7a065a60f586fe617bf6af0814064eb903.tar.gz yuzu-c05c8a7a065a60f586fe617bf6af0814064eb903.tar.xz yuzu-c05c8a7a065a60f586fe617bf6af0814064eb903.zip | |
service/fsp_srv: Don't pass SaveDataDescriptor instances by value.
Passing around a 64 byte data struct by value is kind of wasteful,
instead pass a reference to the struct.
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/savedata_factory.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index aba7249b5..7974b031d 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp | |||
| @@ -30,7 +30,7 @@ SaveDataFactory::SaveDataFactory(VirtualDir save_directory) : dir(std::move(save | |||
| 30 | 30 | ||
| 31 | SaveDataFactory::~SaveDataFactory() = default; | 31 | SaveDataFactory::~SaveDataFactory() = default; |
| 32 | 32 | ||
| 33 | ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, SaveDataDescriptor meta) { | 33 | ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, const SaveDataDescriptor& meta) { |
| 34 | if (meta.type == SaveDataType::SystemSaveData || meta.type == SaveDataType::SaveData) { | 34 | if (meta.type == SaveDataType::SystemSaveData || meta.type == SaveDataType::SaveData) { |
| 35 | if (meta.zero_1 != 0) { | 35 | if (meta.zero_1 != 0) { |
| 36 | LOG_WARNING(Service_FS, | 36 | LOG_WARNING(Service_FS, |
diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h index 77e93250a..b73654571 100644 --- a/src/core/file_sys/savedata_factory.h +++ b/src/core/file_sys/savedata_factory.h | |||
| @@ -64,7 +64,7 @@ public: | |||
| 64 | explicit SaveDataFactory(VirtualDir dir); | 64 | explicit SaveDataFactory(VirtualDir dir); |
| 65 | ~SaveDataFactory(); | 65 | ~SaveDataFactory(); |
| 66 | 66 | ||
| 67 | ResultVal<VirtualDir> Open(SaveDataSpaceId space, SaveDataDescriptor meta); | 67 | ResultVal<VirtualDir> Open(SaveDataSpaceId space, const SaveDataDescriptor& meta); |
| 68 | 68 | ||
| 69 | VirtualDir GetSaveDataSpaceDirectory(SaveDataSpaceId space) const; | 69 | VirtualDir GetSaveDataSpaceDirectory(SaveDataSpaceId space) const; |
| 70 | 70 | ||