From 14e2df56101f7c7ab87939ea7a708ab4e6fb70c6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 25 Sep 2018 17:26:09 -0400 Subject: vfs_static: Remove template byte parameter from StaticVfsFile This converts it into a regular constructor parameter. There's no need to make this a template parameter on the class when it functions perfectly well as a constructor argument. This also reduces the amount of code bloat produced by the compiler, as it doesn't need to generate the same code for multiple different instantiations of the same class type, but with a different fill value. --- src/core/file_sys/romfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/file_sys/romfs.cpp') diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp index 205284a4d..7804ef56d 100644 --- a/src/core/file_sys/romfs.cpp +++ b/src/core/file_sys/romfs.cpp @@ -134,7 +134,7 @@ VirtualFile CreateRomFS(VirtualDir dir) { return nullptr; RomFSBuildContext ctx{dir}; - return ConcatenateFiles<0>(ctx.Build(), dir->GetName()); + return ConcatenateFiles(0, ctx.Build(), dir->GetName()); } } // namespace FileSys -- cgit v1.2.3 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/romfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/file_sys/romfs.cpp') diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp index 7804ef56d..5910f7046 100644 --- a/src/core/file_sys/romfs.cpp +++ b/src/core/file_sys/romfs.cpp @@ -134,7 +134,7 @@ VirtualFile CreateRomFS(VirtualDir dir) { return nullptr; RomFSBuildContext ctx{dir}; - return ConcatenateFiles(0, ctx.Build(), dir->GetName()); + return ConcatenatedVfsFile::MakeConcatenatedFile(0, ctx.Build(), dir->GetName()); } } // namespace FileSys -- cgit v1.2.3