diff options
| author | 2018-07-19 10:34:09 -0400 | |
|---|---|---|
| committer | 2018-07-19 10:34:11 -0400 | |
| commit | 5da4c78c6a1b6bef2ec3de49ef9688d548c376aa (patch) | |
| tree | 66bfb923cff787a659f07c221534616616fb0194 /src | |
| parent | filesystem: Use std::string's empty() function instead of comparing against a... (diff) | |
| download | yuzu-5da4c78c6a1b6bef2ec3de49ef9688d548c376aa.tar.gz yuzu-5da4c78c6a1b6bef2ec3de49ef9688d548c376aa.tar.xz yuzu-5da4c78c6a1b6bef2ec3de49ef9688d548c376aa.zip | |
filesystem: std::move VirtualDir instance in VfsDirectoryServiceWrapper's constructor
Avoids unnecessary atomic reference count incrementing and decrementing
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index a6b8386a7..55282f3af 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <utility> | ||
| 6 | |||
| 5 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 6 | #include "common/file_util.h" | 8 | #include "common/file_util.h" |
| 7 | #include "core/core.h" | 9 | #include "core/core.h" |
| @@ -30,7 +32,7 @@ static FileSys::VirtualDir GetDirectoryRelativeWrapped(FileSys::VirtualDir base, | |||
| 30 | } | 32 | } |
| 31 | 33 | ||
| 32 | VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_) | 34 | VfsDirectoryServiceWrapper::VfsDirectoryServiceWrapper(FileSys::VirtualDir backing_) |
| 33 | : backing(backing_) {} | 35 | : backing(std::move(backing_)) {} |
| 34 | 36 | ||
| 35 | std::string VfsDirectoryServiceWrapper::GetName() const { | 37 | std::string VfsDirectoryServiceWrapper::GetName() const { |
| 36 | return backing->GetName(); | 38 | return backing->GetName(); |