From 50be8204d4f199486a14e9079487aafda62a7f15 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 8 Nov 2020 12:23:48 +0000 Subject: [PATCH] reproc++: Make deleter a static function. No reason for a lambda when a static function will do. --- reproc++/src/reproc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reproc++/src/reproc.cpp b/reproc++/src/reproc.cpp index de9e1d9d..a248e3fb 100644 --- a/reproc++/src/reproc.cpp +++ b/reproc++/src/reproc.cpp @@ -62,9 +62,9 @@ static reproc_options reproc_options_from(const options &options, bool fork) }; } -const auto deleter = [](reproc_t *process) noexcept { +static void deleter(reproc_t *process) noexcept { reproc_destroy(process); -}; +} process::process() : impl_(reproc_new(), deleter) {} process::~process() noexcept = default;