diff options
author | Lioncash <mathew1800@gmail.com> | 2018-07-20 00:10:21 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-07-20 00:10:24 -0400 |
commit | 8874d0e657be9b2f03608a91bcf5edf433e576c7 (patch) | |
tree | faa01fd0bc8d50581eb118e669e7d606fa460625 /src/core/loader/nca.cpp | |
parent | 0e9d58e82a86dc8948aca9bbb12c647023031cbd (diff) |
loader/{nca, nro}: std::move VirtualFile in the constructors where applicable
This avoids unnecessary atomic reference count increments and decrements
Diffstat (limited to 'src/core/loader/nca.cpp')
-rw-r--r-- | src/core/loader/nca.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/loader/nca.cpp b/src/core/loader/nca.cpp index e73b253b2..c80df23be 100644 --- a/src/core/loader/nca.cpp +++ b/src/core/loader/nca.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include <utility> #include <vector> #include "common/file_util.h" @@ -21,7 +22,7 @@ namespace Loader { -AppLoader_NCA::AppLoader_NCA(FileSys::VirtualFile file) : AppLoader(file) {} +AppLoader_NCA::AppLoader_NCA(FileSys::VirtualFile file) : AppLoader(std::move(file)) {} FileType AppLoader_NCA::IdentifyType(const FileSys::VirtualFile& file) { // TODO(DarkLordZach): Assuming everything is decrypted. Add crypto support. |