diff options
author | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-06-23 15:09:03 +0200 |
---|---|---|
committer | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-08-08 17:24:00 +0200 |
commit | 2cf43e5ff74f7e7cf782cf789c87423aedd39ac4 (patch) | |
tree | 1784d0bbfaf1eb443a41cef1ea5efdf439087a91 /src | |
parent | 1e4ce4dfbb457caa9452d16d76f112cff228ff69 (diff) |
main: do not capture the whole environment in lambdas
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<genivi::controller>(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<wl::output>(r, name, v)); }); |