summaryrefslogtreecommitdiffstats
path: root/Source/cmFileTimeCache.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-03-27 12:43:08 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-03-27 17:09:53 (GMT)
commit5f6c236481da552dfdbfff6579dc9d833993adad (patch)
treeaafe256099b88b8faaf5617270696705db965ea9 /Source/cmFileTimeCache.cxx
parent18c30786a9a1444e726e23366dd9badb01f1d464 (diff)
downloadCMake-5f6c236481da552dfdbfff6579dc9d833993adad.zip
CMake-5f6c236481da552dfdbfff6579dc9d833993adad.tar.gz
CMake-5f6c236481da552dfdbfff6579dc9d833993adad.tar.bz2
cmFiletimeCache: Add cmFiletimeCache::Remove method
Diffstat (limited to 'Source/cmFileTimeCache.cxx')
-rw-r--r--Source/cmFileTimeCache.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmFileTimeCache.cxx b/Source/cmFileTimeCache.cxx
index 1fff6a9..24d6bf6 100644
--- a/Source/cmFileTimeCache.cxx
+++ b/Source/cmFileTimeCache.cxx
@@ -14,8 +14,8 @@ bool cmFileTimeCache::Load(std::string const& fileName, cmFileTime& fileTime)
{
// Use the stored time if available.
{
- auto fit = this->FileTimes.find(fileName);
- if (fit != this->FileTimes.end()) {
+ auto fit = this->Cache.find(fileName);
+ if (fit != this->Cache.end()) {
fileTime = fit->second;
return true;
}
@@ -25,10 +25,15 @@ bool cmFileTimeCache::Load(std::string const& fileName, cmFileTime& fileTime)
return false;
}
// Store file time in cache
- this->FileTimes[fileName] = fileTime;
+ this->Cache[fileName] = fileTime;
return true;
}
+bool cmFileTimeCache::Remove(std::string const& fileName)
+{
+ return (this->Cache.erase(fileName) != 0);
+}
+
bool cmFileTimeCache::Compare(std::string const& f1, std::string const& f2,
int* result)
{