File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -210,16 +210,15 @@ array_exprt interval_sparse_arrayt::concretize(
210210 array_exprt array (array_type);
211211 array.operands ().reserve (size);
212212
213- std::size_t current_index = 0 ;
214- for (const auto &pair : entries)
215- {
216- for (; current_index <= pair.first && current_index < size; ++current_index)
217- array.operands ().push_back (pair.second );
218- }
219- for (; current_index < size; ++current_index)
220- array.operands ().push_back (default_value);
213+ auto it = entries.begin ();
214+ for (; it != entries.end () && it->first < size; ++it)
215+ array.operands ().resize (it->first + 1 , it->second );
216+
217+ array.operands ().resize (
218+ size, it == entries.end () ? default_value : it->second );
221219 return array;
222220}
221+
223222void equation_symbol_mappingt::add (const std::size_t i, const exprt &expr)
224223{
225224 equations_containing[expr].push_back (i);
You can’t perform that action at this time.
0 commit comments