From 28bef31ea80478fe58bc4eeaf1b245005f15b36a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 25 Sep 2018 17:38:16 -0400 Subject: 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. --- src/core/file_sys/vfs_layered.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core/file_sys/vfs_layered.h') diff --git a/src/core/file_sys/vfs_layered.h b/src/core/file_sys/vfs_layered.h index 4f6e341ab..d85310f57 100644 --- a/src/core/file_sys/vfs_layered.h +++ b/src/core/file_sys/vfs_layered.h @@ -9,20 +9,18 @@ namespace FileSys { -// Wrapper function to allow for more efficient handling of dirs.size() == 0, 1 cases. -VirtualDir LayerDirectories(std::vector 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 dirs, std::string name); - LayeredVfsDirectory(std::vector 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 dirs, std::string name = ""); + std::shared_ptr GetFileRelative(std::string_view path) const override; std::shared_ptr GetDirectoryRelative(std::string_view path) const override; std::shared_ptr GetFile(std::string_view name) const override; -- cgit v1.2.3