From 46acd5c16dfc786cb5ff537e4ab352b17c11921d Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Fri, 21 Aug 2020 00:55:28 -0700 Subject: [PATCH] Pass all used vars by reference --- elfio/elfio_symbols.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elfio/elfio_symbols.hpp b/elfio/elfio_symbols.hpp index 5ed5f07..33a3410 100644 --- a/elfio/elfio_symbols.hpp +++ b/elfio/elfio_symbols.hpp @@ -139,11 +139,11 @@ class symbol_section_accessor_template Elf64_Addr v = 0; if ( elf_file.get_class() == ELFCLASS32 ) { - match = generic_search_symbols([&convertor, &value](const Elf32_Sym* sym) { + match = generic_search_symbols([&](const Elf32_Sym* sym) { return convertor(sym->st_value) == value; }, idx); } else { - match = generic_search_symbols([&convertor, &value](const Elf64_Sym* sym) { + match = generic_search_symbols([&](const Elf64_Sym* sym) { return convertor(sym->st_value) == value; }, idx); }