From c0a025542988b63275fe1f9281020f4d4bec58a6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 30 May 2020 20:03:45 +0300 Subject: Fix process_path() constructor --- libbutl/process.ixx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libbutl/process.ixx') 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:: -- cgit v1.1