diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-21 06:08:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-10-21 06:08:46 +0200 |
commit | 02d5d7693c79de278cbc1fe4bb4b1bf957a7895a (patch) | |
tree | 239672d719f4b15c4c68ab88b6289e8c9ffd32fc /libbuild2 | |
parent | ee8aa21a8b735e9336ff20fbfce8c834f92f33e8 (diff) |
Fix bug in file_cache::entry move constructor and assignment operator
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/file-cache.ixx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libbuild2/file-cache.ixx b/libbuild2/file-cache.ixx index b4773e7..f8a49cc 100644 --- a/libbuild2/file-cache.ixx +++ b/libbuild2/file-cache.ixx @@ -72,6 +72,7 @@ namespace build2 comp_path_ (move (e.comp_path_)), pin_ (e.pin_) { + e.state_ = null; } inline file_cache::entry& file_cache::entry:: @@ -80,11 +81,14 @@ namespace build2 if (this != &e) { assert (state_ == null); + temporary = e.temporary; state_ = e.state_; path_ = move (e.path_); comp_path_ = move (e.comp_path_); pin_ = e.pin_; + + e.state_ = null; } return *this; } |