From 43677021e3c285c2ced2075b918da947e13fcb00 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 20 May 2020 22:58:43 +0100 Subject: refactor(3p/nix): Apply clang-tidy's performance-* fixes This applies the performance fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html --- third_party/nix/src/libutil/serialise.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'third_party/nix/src/libutil/serialise.cc') diff --git a/third_party/nix/src/libutil/serialise.cc b/third_party/nix/src/libutil/serialise.cc index 4b12367196f1..34af4e840ab6 100644 --- a/third_party/nix/src/libutil/serialise.cc +++ b/third_party/nix/src/libutil/serialise.cc @@ -157,8 +157,8 @@ size_t StringSource::read(unsigned char* data, size_t len) { #error Coroutines are broken in this version of Boost! #endif -std::unique_ptr sinkToSource(std::function fun, - std::function eof) { +std::unique_ptr sinkToSource(const std::function& fun, + const std::function& eof) { struct SinkToSource : Source { using coro_t = boost::coroutines2::coroutine; -- cgit 1.4.1