From 914edd11947457e07a411a5754cef60d30b766d6 Mon Sep 17 00:00:00 2001 From: elsid Date: Sat, 27 Aug 2022 01:54:20 +0200 Subject: [PATCH] Make frequently called oneliners inline --- components/detournavigator/cachedrecastmeshmanager.cpp | 5 ----- components/detournavigator/cachedrecastmeshmanager.hpp | 2 +- components/detournavigator/recastmeshmanager.cpp | 5 ----- components/detournavigator/recastmeshmanager.hpp | 2 +- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/components/detournavigator/cachedrecastmeshmanager.cpp b/components/detournavigator/cachedrecastmeshmanager.cpp index 61c2a36345..65f99fae1e 100644 --- a/components/detournavigator/cachedrecastmeshmanager.cpp +++ b/components/detournavigator/cachedrecastmeshmanager.cpp @@ -97,9 +97,4 @@ namespace DetourNavigator { mImpl.reportNavMeshChange(recastMeshVersion, navMeshVersion); } - - Version CachedRecastMeshManager::getVersion() const - { - return mImpl.getVersion(); - } } diff --git a/components/detournavigator/cachedrecastmeshmanager.hpp b/components/detournavigator/cachedrecastmeshmanager.hpp index 1fcb8e5a28..df4a5b3319 100644 --- a/components/detournavigator/cachedrecastmeshmanager.hpp +++ b/components/detournavigator/cachedrecastmeshmanager.hpp @@ -41,7 +41,7 @@ namespace DetourNavigator void reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion); - Version getVersion() const; + Version getVersion() const { return mImpl.getVersion(); } private: RecastMeshManager mImpl; diff --git a/components/detournavigator/recastmeshmanager.cpp b/components/detournavigator/recastmeshmanager.cpp index 8eb8b462a9..b0ac337da5 100644 --- a/components/detournavigator/recastmeshmanager.cpp +++ b/components/detournavigator/recastmeshmanager.cpp @@ -164,9 +164,4 @@ namespace DetourNavigator || mLastNavMeshReportedChange->mNavMeshVersion < mLastNavMeshReport->mNavMeshVersion) mLastNavMeshReportedChange = mLastNavMeshReport; } - - Version RecastMeshManager::getVersion() const - { - return Version {mGeneration, mRevision}; - } } diff --git a/components/detournavigator/recastmeshmanager.hpp b/components/detournavigator/recastmeshmanager.hpp index 8618d749e6..ad27933807 100644 --- a/components/detournavigator/recastmeshmanager.hpp +++ b/components/detournavigator/recastmeshmanager.hpp @@ -55,7 +55,7 @@ namespace DetourNavigator void reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion); - Version getVersion() const; + Version getVersion() const { return Version {mGeneration, mRevision}; } private: struct Report