diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-11-17 07:30:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-11-17 07:30:37 +0200 |
commit | 495de53eb379eff3cf998b210f7472619741e037 (patch) | |
tree | f55b28ad046019a4fbc1630e4b8e772c5b9826c2 /libbuild2/target.ixx | |
parent | 23b059eea0618220010b30bacbf97db7f642c870 (diff) |
Add pre-condition assert to target::newer()
Diffstat (limited to 'libbuild2/target.ixx')
-rw-r--r-- | libbuild2/target.ixx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libbuild2/target.ixx b/libbuild2/target.ixx index 69b2776..39b81e7 100644 --- a/libbuild2/target.ixx +++ b/libbuild2/target.ixx @@ -769,6 +769,8 @@ namespace build2 inline bool mtime_target:: newer (timestamp mt, target_state s) const { + assert (s != target_state::unknown); // Should be executed. + timestamp mp (mtime ()); // What do we do if timestamps are equal? This can happen, for example, |