mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 08:35:47 +00: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:
parent
7cab491fcb
commit
c42d80cd15
8 changed files with 59 additions and 61 deletions
|
@ -9,20 +9,18 @@
|
|||
|
||||
namespace FileSys {
|
||||
|
||||
// Wrapper function to allow for more efficient handling of dirs.size() == 0, 1 cases.
|
||||
VirtualDir LayerDirectories(std::vector<VirtualDir> dirs, std::string name = "");
|
||||
|
||||
// Class that stacks multiple VfsDirectories on top of each other, attempting to read from the first
|
||||
// one and falling back to the one after. The highest priority directory (overwrites all others)
|
||||
// should be element 0 in the dirs vector.
|
||||
class LayeredVfsDirectory : public VfsDirectory {
|
||||
friend VirtualDir LayerDirectories(std::vector<VirtualDir> dirs, std::string name);
|
||||
|
||||
LayeredVfsDirectory(std::vector<VirtualDir> dirs, std::string name);
|
||||
|
||||
public:
|
||||
~LayeredVfsDirectory() override;
|
||||
|
||||
/// Wrapper function to allow for more efficient handling of dirs.size() == 0, 1 cases.
|
||||
static VirtualDir MakeLayeredDirectory(std::vector<VirtualDir> dirs, std::string name = "");
|
||||
|
||||
std::shared_ptr<VfsFile> GetFileRelative(std::string_view path) const override;
|
||||
std::shared_ptr<VfsDirectory> GetDirectoryRelative(std::string_view path) const override;
|
||||
std::shared_ptr<VfsFile> GetFile(std::string_view name) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue