diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-27 13:43:08 +0100 |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-03-27 18:09:53 +0100 |
commit | 5f6c236481da552dfdbfff6579dc9d833993adad (patch) | |
tree | aafe256099b88b8faaf5617270696705db965ea9 /Source/cmFileTimeCache.h | |
parent | 18c30786a9a1444e726e23366dd9badb01f1d464 (diff) | |
download | cmake-5f6c236481da552dfdbfff6579dc9d833993adad.tar.gz |
cmFiletimeCache: Add cmFiletimeCache::Remove method
Diffstat (limited to 'Source/cmFileTimeCache.h')
-rw-r--r-- | Source/cmFileTimeCache.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmFileTimeCache.h b/Source/cmFileTimeCache.h index a47904c265..4f1a3a253c 100644 --- a/Source/cmFileTimeCache.h +++ b/Source/cmFileTimeCache.h @@ -5,7 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include "cmFileTime.h" +#include "cmFileTime.h" // IWYU pragma: keep #include <string> #include <unordered_map> @@ -28,6 +28,12 @@ public: bool Load(std::string const& fileName, cmFileTime& fileTime); /** + * @brief Removes a file time from the cache + * @return true if the file was found in the cache and removed + */ + bool Remove(std::string const& fileName); + + /** * @brief Compare file modification times. * @return true for successful comparison and false for error. * @@ -44,8 +50,7 @@ public: bool DifferS(std::string const& f1, std::string const& f2); private: - typedef std::unordered_map<std::string, cmFileTime> FileTimeMap; - FileTimeMap FileTimes; + std::unordered_map<std::string, cmFileTime> Cache; }; #endif |