mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-17 13:47:57 -05:00
vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFile
Given these are only added to the class to allow those functions to access the private constructor, it's a better approach to just make them static functions in the interface, to make the dependency explicit.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user