aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/depdb.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-11-28 10:21:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-11-28 10:21:09 +0200
commit2908afbd6a9222b718c0f910edfbe2fc5943aad8 (patch)
tree91034caec661793da4c5368dd0a00431c3701d8a /libbuild2/depdb.cxx
parenta50652b3e3323a9492c32d2ca6e97befd7d9755b (diff)
Avoid unnecessary work in depdb::close() if using static check_mtime()
Diffstat (limited to 'libbuild2/depdb.cxx')
-rw-r--r--libbuild2/depdb.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/depdb.cxx b/libbuild2/depdb.cxx
index 1215e78..e50870c 100644
--- a/libbuild2/depdb.cxx
+++ b/libbuild2/depdb.cxx
@@ -281,7 +281,7 @@ namespace build2
}
void depdb::
- close ()
+ close (bool mc)
{
// If we are at eof, then it means all lines are good, there is the "end
// marker" at the end, and we don't need to do anything, except, maybe
@@ -329,7 +329,7 @@ namespace build2
change (true /* truncate */);
}
- if (mtime_check ())
+ if (mc && mtime_check ())
start_ = system_clock::now ();
if (state_ == state::write)