From f373417b0b5a3afcecd7c79c86fd8e4c7cfe71d7 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 28 Feb 2019 17:53:01 -0800 Subject: [PATCH] ircd::fs: Use for_each rather than transform here. --- ircd/fs.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ircd/fs.cc b/ircd/fs.cc index 9ccf202bb..0e3503695 100644 --- a/ircd/fs.cc +++ b/ircd/fs.cc @@ -110,10 +110,10 @@ try }; std::vector ret; - std::transform(it, end, std::back_inserter(ret), [] + std::for_each(it, end, [&ret] (const auto &ent) { - return ent.path().string(); + ret.emplace_back(ent.path().string()); }); return ret; @@ -134,10 +134,10 @@ try }; std::vector ret; - std::transform(it, end, std::back_inserter(ret), [] + std::for_each(it, end, [&ret] (const auto &ent) { - return ent.path().string(); + ret.emplace_back(ent.path().string()); }); return ret;