aboutsummaryrefslogtreecommitdiff
path: root/build2/depdb.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-09-01 17:33:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-09-01 17:33:44 +0200
commit53105890d75789c81adbb3d781eff9ebd7110222 (patch)
treeda93174356fc2d0a80f49b11e0cd16e7c71b7c80 /build2/depdb.hxx
parent631c76d7613458dbef208ca056e194e94a5becf3 (diff)
Add support for try_match(), use to handle deleted headers
Diffstat (limited to 'build2/depdb.hxx')
-rw-r--r--build2/depdb.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/build2/depdb.hxx b/build2/depdb.hxx
index da45a4a..520642e 100644
--- a/build2/depdb.hxx
+++ b/build2/depdb.hxx
@@ -144,6 +144,11 @@ namespace build2
void
write (char, bool nl = true);
+ // Mark the previously read line as to be overwritte.
+ //
+ void
+ write () {if (state_ != state::write) change ();}
+
// Read the next line and compare it to the expected value. If it matches,
// return NULL. Otherwise, overwrite it and return the old value (which
// could also be NULL). This strange-sounding result semantics is used to