aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbutl/process.ixx8
-rw-r--r--libbutl/process.mxx3
2 files changed, 9 insertions, 2 deletions
diff --git a/libbutl/process.ixx b/libbutl/process.ixx
index 07c8bac..eba6be5 100644
--- a/libbutl/process.ixx
+++ b/libbutl/process.ixx
@@ -12,12 +12,16 @@ namespace butl
*args0_ = initial;
}
+ // Note that moving the argument into recall and leaving effective empty
+ // complies with the constructor semantics and also makes sure that the
+ // move/copy constructors and assignment operators work correctly.
+ //
inline process_path::
process_path (path e)
- : effect (std::move (e)),
+ : recall (std::move (e)),
args0_ (nullptr)
{
- initial = effect.string ().c_str ();
+ initial = recall.string ().c_str ();
}
inline process_path::
diff --git a/libbutl/process.mxx b/libbutl/process.mxx
index c52869e..fa97ebf 100644
--- a/libbutl/process.mxx
+++ b/libbutl/process.mxx
@@ -130,8 +130,11 @@ LIBBUTL_MODEXPORT namespace butl
void
clear_recall ();
+ // Make all three paths the same.
+ //
explicit
process_path (path effect);
+
process_path (const char* initial, path&& recall, path&& effect);
process_path () = default;