aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-10-21 06:08:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-10-21 06:08:46 +0200
commit02d5d7693c79de278cbc1fe4bb4b1bf957a7895a (patch)
tree239672d719f4b15c4c68ab88b6289e8c9ffd32fc /libbuild2
parentee8aa21a8b735e9336ff20fbfce8c834f92f33e8 (diff)
Fix bug in file_cache::entry move constructor and assignment operator
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/file-cache.ixx4
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;
}