From 94939b5b40b40e792d720426d5680bd490932d93 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 6 May 2023 21:56:59 +0200 Subject: [PATCH] Mark filesystem singleton getter inline --- r5dev/filesystem/filesystem.cpp | 8 -------- r5dev/filesystem/filesystem.h | 9 ++++++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/r5dev/filesystem/filesystem.cpp b/r5dev/filesystem/filesystem.cpp index 1e6f7415..43e85eb8 100644 --- a/r5dev/filesystem/filesystem.cpp +++ b/r5dev/filesystem/filesystem.cpp @@ -2,14 +2,6 @@ #include "vpklib/packedstore.h" #include "filesystem/filesystem.h" -//----------------------------------------------------------------------------- -// Singleton FileSystem -//----------------------------------------------------------------------------- -CFileSystem_Stdio* FileSystem() -{ - return (*g_pFullFileSystem); -} - /////////////////////////////////////////////////////////////////////////////// CFileSystem_Stdio** g_pFullFileSystem = nullptr; CFileSystem_Stdio* g_pFileSystem_Stdio = nullptr; \ No newline at end of file diff --git a/r5dev/filesystem/filesystem.h b/r5dev/filesystem/filesystem.h index 540b2ab5..79a245ee 100644 --- a/r5dev/filesystem/filesystem.h +++ b/r5dev/filesystem/filesystem.h @@ -33,7 +33,14 @@ protected: extern CFileSystem_Stdio** g_pFullFileSystem; // Ptr to g_pFileSystem_Stdio. extern CFileSystem_Stdio* g_pFileSystem_Stdio; -CFileSystem_Stdio* FileSystem(); +//----------------------------------------------------------------------------- +// Singleton FileSystem +//----------------------------------------------------------------------------- +inline CFileSystem_Stdio* FileSystem() +{ + return (*g_pFullFileSystem); +} + /////////////////////////////////////////////////////////////////////////////// class VFileSystem_Stdio : public IDetour {