From fb63ff77d32e249bfbc424c638a227dbacfe8a97 Mon Sep 17 00:00:00 2001 From: Andrei Preda Date: Sat, 19 Aug 2017 16:28:42 +0300 Subject: [PATCH 1/3] Use 'friend struct' instead of 'firend class ArgumentDeducer' in Popen Signed-off-by: Andrei Preda --- subprocess.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprocess.hpp b/subprocess.hpp index c4bcbba..d3840a5 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -932,7 +932,7 @@ private: class Popen { public: - friend class detail::ArgumentDeducer; + friend struct detail::ArgumentDeducer; friend class detail::Child; template From a665bff1bd0681be330f50de40030312d05775e8 Mon Sep 17 00:00:00 2001 From: Andrei Preda Date: Sat, 19 Aug 2017 16:38:49 +0300 Subject: [PATCH 2/3] Make split inline --- subprocess.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprocess.hpp b/subprocess.hpp index d3840a5..7efe047 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -146,7 +146,7 @@ namespace util * to be split. Default constructed to ' '(space) and '\t'(tab) * [out] vector : Vector of strings split at deleimiter. */ - static std::vector + static inline std::vector split(const std::string& str, const std::string& delims=" \t") { std::vector res; From c8577e3d8341760011b216f226f1bad5623790c4 Mon Sep 17 00:00:00 2001 From: Andrei Preda Date: Sat, 19 Aug 2017 16:39:09 +0300 Subject: [PATCH 3/3] Remove unused sys_ret variable --- subprocess.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/subprocess.hpp b/subprocess.hpp index 7efe047..2b7d950 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -1179,7 +1179,6 @@ void Popen::execute_process() throw (CalledProcessError, OSError) } else { - int sys_ret = -1; close (err_wr_pipe);// close child side of pipe, else get stuck in read below stream_.close_child_fds();