aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-04-10 14:35:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-04-10 14:35:36 +0200
commitb1b5570170381eab3ed70116c50f325386727fc3 (patch)
tree16e1a5510549d7669748de8725d7c756912e07e7
parentca0fa738650ab546b1422e0b2dbfdc89ba8eb5a3 (diff)
Add process_path(effect) constructor
-rw-r--r--libbutl/process.ixx8
-rw-r--r--libbutl/process.mxx7
2 files changed, 13 insertions, 2 deletions
diff --git a/libbutl/process.ixx b/libbutl/process.ixx
index ea74e85..07c8bac 100644
--- a/libbutl/process.ixx
+++ b/libbutl/process.ixx
@@ -13,6 +13,14 @@ namespace butl
}
inline process_path::
+ process_path (path e)
+ : effect (std::move (e)),
+ args0_ (nullptr)
+ {
+ initial = effect.string ().c_str ();
+ }
+
+ inline process_path::
process_path (const char* i, path&& r, path&& e)
: initial (i),
recall (std::move (r)),
diff --git a/libbutl/process.mxx b/libbutl/process.mxx
index b8c6054..a03e40f 100644
--- a/libbutl/process.mxx
+++ b/libbutl/process.mxx
@@ -128,6 +128,11 @@ LIBBUTL_MODEXPORT namespace butl
void
clear_recall ();
+ explicit
+ process_path (path effect);
+ process_path (const char* initial, path&& recall, path&& effect);
+ process_path () = default;
+
// Moveable-only type.
//
process_path (process_path&&);
@@ -136,8 +141,6 @@ LIBBUTL_MODEXPORT namespace butl
process_path (const process_path&) = delete;
process_path& operator= (const process_path&) = delete;
- process_path () = default;
- process_path (const char* i, path&& r, path&& e);
~process_path ();
// Manual copying. Should not use args[0] RAII. See path_search() for the