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/vfs_static.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core/file_sys/vfs_static.h') diff --git a/src/core/file_sys/vfs_static.h b/src/core/file_sys/vfs_static.h index 4dd47ffcc..8ad77d300 100644 --- a/src/core/file_sys/vfs_static.h +++ b/src/core/file_sys/vfs_static.h @@ -12,11 +12,11 @@ namespace FileSys { -template class StaticVfsFile : public VfsFile { public: - explicit StaticVfsFile(size_t size = 0, std::string name = "", VirtualDir parent = nullptr) - : size(size), name(std::move(name)), parent(std::move(parent)) {} + explicit StaticVfsFile(u8 value, size_t size = 0, std::string name = "", + VirtualDir parent = nullptr) + : value{value}, size{size}, name{std::move(name)}, parent{std::move(parent)} {} std::string GetName() const override { return name; @@ -70,6 +70,7 @@ public: } private: + u8 value; size_t size; std::string name; VirtualDir parent; -- cgit v1.2.3