summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-20 18:21:15 +0200
committerGitHub <noreply@github.com>2018-07-20 18:21:15 +0200
commitffbd51e207fb5e2aaaa5f5a8861d4d3e55188376 (patch)
tree812c30415af58b2a478b005b10b81cd69bb5a5cd /src/core/file_sys
parentMerge pull request #736 from lioncash/null (diff)
parentloader/{nca, nro}: std::move VirtualFile in the constructors where applicable (diff)
downloadyuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.tar
yuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.tar.gz
yuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.tar.bz2
yuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.tar.lz
yuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.tar.xz
yuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.tar.zst
yuzu-ffbd51e207fb5e2aaaa5f5a8861d4d3e55188376.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/vfs_offset.cpp6
-rw-r--r--src/core/file_sys/vfs_offset.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/core/file_sys/vfs_offset.cpp b/src/core/file_sys/vfs_offset.cpp
index 288499cb5..31fdd9aa1 100644
--- a/src/core/file_sys/vfs_offset.cpp
+++ b/src/core/file_sys/vfs_offset.cpp
@@ -2,13 +2,15 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <utility>
+
#include "core/file_sys/vfs_offset.h"
namespace FileSys {
OffsetVfsFile::OffsetVfsFile(std::shared_ptr<VfsFile> file_, size_t size_, size_t offset_,
- const std::string& name_)
- : file(file_), offset(offset_), size(size_), name(name_) {}
+ std::string name_)
+ : file(std::move(file_)), offset(offset_), size(size_), name(std::move(name_)) {}
std::string OffsetVfsFile::GetName() const {
return name.empty() ? file->GetName() : name;
diff --git a/src/core/file_sys/vfs_offset.h b/src/core/file_sys/vfs_offset.h
index adc615b38..2e16e47eb 100644
--- a/src/core/file_sys/vfs_offset.h
+++ b/src/core/file_sys/vfs_offset.h
@@ -14,7 +14,7 @@ namespace FileSys {
// the size of this wrapper.
struct OffsetVfsFile : public VfsFile {
OffsetVfsFile(std::shared_ptr<VfsFile> file, size_t size, size_t offset = 0,
- const std::string& new_name = "");
+ std::string new_name = "");
std::string GetName() const override;
size_t GetSize() const override;