From 43c7438e8e9907cfc0e895f11a7176cd03837d61 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Fri, 28 Sep 2018 16:47:47 +0400 Subject: [PATCH] Move WeakCache to components/misc --- apps/opencs/model/world/actoradapter.hpp | 6 +++--- components/CMakeLists.txt | 6 +----- components/{cache => misc}/weakcache.hpp | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) rename components/{cache => misc}/weakcache.hpp (99%) diff --git a/apps/opencs/model/world/actoradapter.hpp b/apps/opencs/model/world/actoradapter.hpp index b97c652a8..1c9265be4 100644 --- a/apps/opencs/model/world/actoradapter.hpp +++ b/apps/opencs/model/world/actoradapter.hpp @@ -8,9 +8,9 @@ #include #include -#include #include #include +#include #include "refidcollection.hpp" #include "idcollection.hpp" @@ -163,8 +163,8 @@ namespace CSMWorld IdCollection& mRaces; IdCollection& mBodyParts; - cache::WeakCache mCachedActors; // Key: referenceable id - cache::WeakCache mCachedRaces; // Key: race id + Misc::WeakCache mCachedActors; // Key: referenceable id + Misc::WeakCache mCachedRaces; // Key: race id StringSet mDirtyActors; // Actors that need updating StringSet mDirtyRaces; // Races that need updating diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 494e1c5ce..5c245afd0 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -86,7 +86,7 @@ add_component_dir (esmterrain ) add_component_dir (misc - constants utf8stream stringops resourcehelpers rng messageformatparser + constants utf8stream stringops resourcehelpers rng messageformatparser weakcache ) add_component_dir (debug @@ -150,10 +150,6 @@ add_component_dir (fallback fallback validate ) -add_component_dir(cache - weakcache - ) - if(NOT WIN32 AND NOT ANDROID) add_component_dir (crashcatcher crashcatcher diff --git a/components/cache/weakcache.hpp b/components/misc/weakcache.hpp similarity index 99% rename from components/cache/weakcache.hpp rename to components/misc/weakcache.hpp index 976818cc2..022a722db 100644 --- a/components/cache/weakcache.hpp +++ b/components/misc/weakcache.hpp @@ -5,7 +5,7 @@ #include #include -namespace cache +namespace Misc { /// \class WeakCache /// Provides a container to weakly store pointers to shared data.