aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/depdb.hxx
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.hxx
parenta50652b3e3323a9492c32d2ca6e97befd7d9755b (diff)
Avoid unnecessary work in depdb::close() if using static check_mtime()
Diffstat (limited to 'libbuild2/depdb.hxx')
-rw-r--r--libbuild2/depdb.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbuild2/depdb.hxx b/libbuild2/depdb.hxx
index 9cff281..5b5052d 100644
--- a/libbuild2/depdb.hxx
+++ b/libbuild2/depdb.hxx
@@ -118,10 +118,12 @@ namespace build2
// function will "chop off" lines that haven't been read.
//
// Make sure to also call check_mtime() after updating the target to
- // perform the target/database modification times sanity checks.
+ // perform the target/database modification times sanity checks. Pass
+ // false to close() to avoid unnecessary work if using the static version
+ // of check_mtime() (or not using it at all for some reason).
//
void
- close ();
+ close (bool mtime_check = true);
// Flush any unwritten data to disk. This is primarily useful when reusing
// a (partially written) database as an input to external programs (e.g.,