Commit 3039fd7a authored by Sebastian Holtermann's avatar Sebastian Holtermann
Browse files

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.
parent b96c3c74
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <utility> #include <utility>
#include "cmAlgorithms.h" #include "cmAlgorithms.h"
#include "cmFileTimeComparison.h"
#include "cmLocalGenerator.h" #include "cmLocalGenerator.h"
#include "cmMakefile.h" #include "cmMakefile.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
...@@ -258,8 +257,8 @@ void cmDependsC::ReadCacheFile() ...@@ -258,8 +257,8 @@ void cmDependsC::ReadCacheFile()
if (!haveFileName) { if (!haveFileName) {
haveFileName = true; haveFileName = true;
int newer = 0; int newer = 0;
cmFileTimeComparison comp; bool res =
bool res = comp.FileTimeCompare(this->CacheFileName, line, &newer); cmSystemTools::FileTimeCompare(this->CacheFileName, line, &newer);
if (res && newer == 1) // cache is newer than the parsed file if (res && newer == 1) // cache is newer than the parsed file
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment