From 3039fd7a2934f726b37ba4ef8379364441241e7d Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Tue, 12 Mar 2019 12:44:30 +0100 Subject: cmDependsC: Use faster cmSystemTools::FileTimeCompare The file stat caching feature of the local cmFileTimeComparison instance is unused in the addressed context. To avoid the allocation and initialization overhead of cmFileTimeComparison use cmSystemTools::FileTimeCompare instead. --- Source/cmDependsC.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 57b5c36..a85f5ee 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -6,7 +6,6 @@ #include #include "cmAlgorithms.h" -#include "cmFileTimeComparison.h" #include "cmLocalGenerator.h" #include "cmMakefile.h" #include "cmSystemTools.h" @@ -258,8 +257,8 @@ void cmDependsC::ReadCacheFile() if (!haveFileName) { haveFileName = true; int newer = 0; - cmFileTimeComparison comp; - bool res = comp.FileTimeCompare(this->CacheFileName, line, &newer); + bool res = + cmSystemTools::FileTimeCompare(this->CacheFileName, line, &newer); if (res && newer == 1) // cache is newer than the parsed file { -- cgit v0.12