diff options
Diffstat (limited to 'Source/cmFileTimeCache.cxx')
-rw-r--r-- | Source/cmFileTimeCache.cxx | 11 |
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) { |