Skip to content

Commit 704ed4f

Browse files
thk123Daniel Kroening
thk123
authored and
Daniel Kroening
committed
Replaced a for loop with a ranged based for loop
1 parent 43b95ca commit 704ed4f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/solvers/cvc/cvc_conv.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,17 +1619,15 @@ void cvc_convt::convert_type(const typet &type)
16191619
const struct_typet::componentst &components=
16201620
struct_type.components();
16211621

1622-
for(struct_typet::componentst::const_iterator
1623-
it=components.begin();
1624-
it!=components.end();
1625-
it++)
1622+
for(struct_typet::componentt component : components)
16261623
{
1627-
if(it!=components.begin())
1624+
if(component!=components.front())
16281625
out << ",";
1626+
16291627
out << " ";
1630-
out << it->get(ID_name);
1628+
out << component.get_name();
16311629
out << ": ";
1632-
convert_type(it->type());
1630+
convert_type(component.type());
16331631
}
16341632

16351633
out << " #]";

0 commit comments

Comments
 (0)