Skip to content

Commit 9423a5c

Browse files
Use bvt constructor instead of manual loop for initialisation
1 parent af0eb45 commit 9423a5c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/solvers/flattening/boolbv_extractbits.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ bvt boolbvt::convert_extractbits(const extractbits_exprt &expr)
5656

5757
const std::size_t offset = integer2unsigned(lower_as_int);
5858

59-
bvt result_bv;
60-
result_bv.resize(bv_width);
61-
62-
for(std::size_t i = 0; i < bv_width; i++)
63-
result_bv[i] = src_bv[offset + i];
59+
bvt result_bv(src_bv.begin() + offset, src_bv.begin() + offset + bv_width);
6460

6561
return result_bv;
6662
}

0 commit comments

Comments
 (0)