Skip to content

Commit adc0eba

Browse files
Avoid unnecessary copies in add_java_array_types.cpp
Without the & we’re copying the items we’re iterating over, which is unnecessary in this case.
1 parent 847211c commit adc0eba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jbmc/unit/java_bytecode/java_bytecode_convert_class/add_java_array_types.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ TEST_CASE("Add array types", "[core]")
2727

2828
SECTION("Array class symbol exists")
2929
{
30-
for(const std::string array_type : array_types)
30+
for(const std::string &array_type : array_types)
3131
{
3232
const auto array_type_symbol = require_symbol::require_symbol_exists(
3333
symbol_table, "java::array[" + array_type + "]");
@@ -38,7 +38,7 @@ TEST_CASE("Add array types", "[core]")
3838
}
3939
SECTION("Array clone method exists")
4040
{
41-
for(const std::string array_type : array_types)
41+
for(const std::string &array_type : array_types)
4242
{
4343
const auto array_type_symbol = require_symbol::require_symbol_exists(
4444
symbol_table,

0 commit comments

Comments
 (0)