diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-09-24 03:50:16 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-09-24 03:50:20 +0200 |
commit | b3c2ec362bbbdd89da9c0aa84b425717f5e3d351 (patch) | |
tree | d3f4e621532f1f280f94bac4e6d071707aabbd35 /src/core/file_sys/vfs_vector.cpp | |
parent | qt: Add UI elements for LayeredFS and related tools (diff) | |
download | yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.gz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.bz2 yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.lz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.xz yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.tar.zst yuzu-b3c2ec362bbbdd89da9c0aa84b425717f5e3d351.zip |
Diffstat (limited to 'src/core/file_sys/vfs_vector.cpp')
-rw-r--r-- | src/core/file_sys/vfs_vector.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/file_sys/vfs_vector.cpp b/src/core/file_sys/vfs_vector.cpp index efca3d4ad..7033e2c88 100644 --- a/src/core/file_sys/vfs_vector.cpp +++ b/src/core/file_sys/vfs_vector.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include <algorithm> +#include <cstring> #include <utility> #include "core/file_sys/vfs_vector.h" @@ -10,6 +11,8 @@ namespace FileSys { VectorVfsFile::VectorVfsFile(std::vector<u8> initial_data, std::string name, VirtualDir parent) : data(std::move(initial_data)), name(std::move(name)), parent(std::move(parent)) {} +VectorVfsFile::~VectorVfsFile() = default; + std::string VectorVfsFile::GetName() const { return name; } @@ -20,7 +23,7 @@ size_t VectorVfsFile::GetSize() const { bool VectorVfsFile::Resize(size_t new_size) { data.resize(new_size); - return data.size() == new_size; + return true; } std::shared_ptr<VfsDirectory> VectorVfsFile::GetContainingDirectory() const { @@ -55,7 +58,7 @@ bool VectorVfsFile::Rename(std::string_view name_) { } void VectorVfsFile::Assign(std::vector<u8> new_data) { - data = new_data; + data = std::move(new_data); } VectorVfsDirectory::VectorVfsDirectory(std::vector<VirtualFile> files_, |