From 9e8320dbd64d84ca2f008f7b4f9f2451130734a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 10 Jun 2023 13:51:59 +0200 Subject: [PATCH] fix c++20 warnings --- src/nix-eval-jobs.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nix-eval-jobs.cc b/src/nix-eval-jobs.cc index 0d8c97c..2fce82c 100644 --- a/src/nix-eval-jobs.cc +++ b/src/nix-eval-jobs.cc @@ -84,11 +84,11 @@ struct MyArgs : MixEvalArgs, MixCommonArgs { .labels = {"path"}, .handler = {&gcRootsDir}}); - addFlag( - {.longName = "workers", - .description = "number of evaluate workers", - .labels = {"workers"}, - .handler = {[=](std::string s) { nrWorkers = std::stoi(s); }}}); + addFlag({.longName = "workers", + .description = "number of evaluate workers", + .labels = {"workers"}, + .handler = { + [=, this](std::string s) { nrWorkers = std::stoi(s); }}}); addFlag( {.longName = "max-memory-size", @@ -96,7 +96,7 @@ struct MyArgs : MixEvalArgs, MixCommonArgs { "maximum evaluation memory size (4GiB per worker by default)", .labels = {"size"}, .handler = { - [=](std::string s) { maxMemorySize = std::stoi(s); }}}); + [=, this](std::string s) { maxMemorySize = std::stoi(s); }}}); addFlag({.longName = "flake", .description = "build a flake",