Skip to content

Commit 51751ce

Browse files
mgudemannDaniel Kroening
authored andcommitted
remove superfluous std::move from conversion
1 parent a0e5510 commit 51751ce

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,18 +1124,17 @@ codet java_bytecode_convert_methodt::convert_instructions(
11241124
typet element_type=data_ptr.type().subtype();
11251125
const dereference_exprt element(data_plus_offset, element_type);
11261126

1127-
code_blockt assert_and_put;
1127+
c=code_blockt();
11281128
if(!disable_runtime_checks)
11291129
{
11301130
codet bounds_check=
11311131
get_array_bounds_check(deref, op[1], i_it->source_location);
11321132
bounds_check.add_source_location()=i_it->source_location;
1133-
assert_and_put.move_to_operands(bounds_check);
1133+
c.move_to_operands(bounds_check);
11341134
}
11351135
code_assignt array_put(element, op[2]);
11361136
array_put.add_source_location()=i_it->source_location;
1137-
assert_and_put.move_to_operands(array_put);
1138-
c=std::move(assert_and_put);
1137+
c.move_to_operands(array_put);
11391138
c.add_source_location()=i_it->source_location;
11401139
}
11411140
else if(statement==patternt("?store"))
@@ -1174,10 +1173,8 @@ codet java_bytecode_convert_methodt::convert_instructions(
11741173

11751174
if(!disable_runtime_checks)
11761175
{
1177-
codet bounds_check=
1178-
get_array_bounds_check(deref, op[1], i_it->source_location);
1179-
bounds_check.add_source_location()=i_it->source_location;
1180-
c=std::move(bounds_check);
1176+
c=get_array_bounds_check(deref, op[1], i_it->source_location);
1177+
c.add_source_location()=i_it->source_location;
11811178
}
11821179
results[0]=java_bytecode_promotion(element);
11831180
}
@@ -1252,7 +1249,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
12521249
// and write something like:
12531250
// if(retaddr==5) goto 5; else if(retaddr==10) goto 10; ...
12541251
assert(op.empty() && results.empty());
1255-
code_blockt branches;
1252+
c=code_blockt();
12561253
auto retvar=variable(arg0, 'a', i_it->address, NO_CAST);
12571254
assert(!jsr_ret_targets.empty());
12581255
for(size_t idx=0, idxlim=jsr_ret_targets.size(); idx!=idxlim; ++idx)
@@ -1261,7 +1258,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
12611258
code_gotot g(label(number));
12621259
g.add_source_location()=i_it->source_location;
12631260
if(idx==idxlim-1)
1264-
branches.move_to_operands(g);
1261+
c.move_to_operands(g);
12651262
else
12661263
{
12671264
code_ifthenelset branch;
@@ -1272,10 +1269,9 @@ codet java_bytecode_convert_methodt::convert_instructions(
12721269
branch.cond().add_source_location()=i_it->source_location;
12731270
branch.then_case()=g;
12741271
branch.add_source_location()=i_it->source_location;
1275-
branches.move_to_operands(branch);
1272+
c.move_to_operands(branch);
12761273
}
12771274
}
1278-
c=std::move(branches);
12791275
}
12801276
else if(statement=="iconst_m1")
12811277
{

0 commit comments

Comments
 (0)