From 05599727a810f9e2e8d37a85f3170255f912631f Mon Sep 17 00:00:00 2001 From: Fotis Koutoulakis Date: Wed, 14 Oct 2020 17:40:29 +0100 Subject: [PATCH] Introduce reference to avoid unneeded copy. Previously this broke the build on macOS, because the compiler was complaining about creating a copy of a const std::pair - which registered as an error (because of -Werror). --- jbmc/src/java_bytecode/lambda_synthesis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbmc/src/java_bytecode/lambda_synthesis.cpp b/jbmc/src/java_bytecode/lambda_synthesis.cpp index 9c465b9da5f..1b58d570fb1 100644 --- a/jbmc/src/java_bytecode/lambda_synthesis.cpp +++ b/jbmc/src/java_bytecode/lambda_synthesis.cpp @@ -156,7 +156,7 @@ get_interface_methods(const irep_idt &interface_id, const namespacet &ns) { const methods_by_name_and_descriptort base_methods = get_interface_methods(base.type().get_identifier(), ns); - for(const auto base_method : base_methods) + for(const auto &base_method : base_methods) { if(base_method.second) {