diff options
author | Lioncash <mathew1800@gmail.com> | 2018-09-25 23:38:16 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-09-26 02:06:01 +0200 |
commit | 28bef31ea80478fe58bc4eeaf1b245005f15b36a (patch) | |
tree | 8ccdb13e155d15b44893a0477984cc83bdf41224 /src/core/file_sys/vfs_concat.h | |
parent | vfs_static: Remove template byte parameter from StaticVfsFile (diff) | |
download | yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.tar yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.tar.gz yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.tar.bz2 yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.tar.lz yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.tar.xz yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.tar.zst yuzu-28bef31ea80478fe58bc4eeaf1b245005f15b36a.zip |
Diffstat (limited to 'src/core/file_sys/vfs_concat.h')
-rw-r--r-- | src/core/file_sys/vfs_concat.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/core/file_sys/vfs_concat.h b/src/core/file_sys/vfs_concat.h index 17fa40ade..c90f9d5d1 100644 --- a/src/core/file_sys/vfs_concat.h +++ b/src/core/file_sys/vfs_concat.h @@ -14,16 +14,20 @@ namespace FileSys { // Class that wraps multiple vfs files and concatenates them, making reads seamless. Currently // read-only. class ConcatenatedVfsFile : public VfsFile { - friend VirtualFile ConcatenateFiles(std::vector<VirtualFile> files, std::string name); - friend VirtualFile ConcatenateFiles(u8 filler_byte, std::map<u64, VirtualFile> files, - std::string name); - ConcatenatedVfsFile(std::vector<VirtualFile> files, std::string name); ConcatenatedVfsFile(std::map<u64, VirtualFile> files, std::string name); public: ~ConcatenatedVfsFile() override; + /// Wrapper function to allow for more efficient handling of files.size() == 0, 1 cases. + static VirtualFile MakeConcatenatedFile(std::vector<VirtualFile> files, std::string name); + + /// Convenience function that turns a map of offsets to files into a concatenated file, filling + /// gaps with a given filler byte. + static VirtualFile MakeConcatenatedFile(u8 filler_byte, std::map<u64, VirtualFile> files, + std::string name); + std::string GetName() const override; std::size_t GetSize() const override; bool Resize(std::size_t new_size) override; @@ -40,11 +44,4 @@ private: std::string name; }; -// Wrapper function to allow for more efficient handling of files.size() == 0, 1 cases. -VirtualFile ConcatenateFiles(std::vector<VirtualFile> files, std::string name); - -// Convenience function that turns a map of offsets to files into a concatenated file, filling gaps -// with a given filler byte. -VirtualFile ConcatenateFiles(u8 filler_byte, std::map<u64, VirtualFile> files, std::string name); - } // namespace FileSys |