File tree 1 file changed +7
-8
lines changed 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(
210
210
array_exprt array (array_type);
211
211
array.operands ().reserve (size);
212
212
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 );
221
219
return array;
222
220
}
221
+
223
222
void equation_symbol_mappingt::add (const std::size_t i, const exprt &expr)
224
223
{
225
224
equations_containing[expr].push_back (i);
You can’t perform that action at this time.
0 commit comments