From 2cf43e5ff74f7e7cf782cf789c87423aedd39ac4 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Fri, 23 Jun 2017 15:09:03 +0200 Subject: main: do not capture the whole environment in lambdas Signed-off-by: Marcus Fritzsch --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 7ff9040..dc67f94 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -134,12 +134,12 @@ int main(int argc, char **argv) { struct conn c = {}; d->r->add_global_handler( - "ivi_controller", [&](wl_registry *r, uint32_t name, uint32_t v) { + "ivi_controller", [&c](wl_registry *r, uint32_t name, uint32_t v) { c.c = std::make_unique(r, name, v); }); d->r->add_global_handler( - "wl_output", [&](wl_registry *r, uint32_t name, uint32_t v) { + "wl_output", [&c](wl_registry *r, uint32_t name, uint32_t v) { c.outputs.emplace_back(std::make_unique(r, name, v)); }); -- cgit 1.2.3-korg