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 @@ -209,16 +209,15 @@ array_exprt interval_sparse_arrayt::concretize(
209
209
array_exprt array (array_type);
210
210
array.operands ().reserve (size);
211
211
212
- std::size_t current_index = 0 ;
213
- for (const auto &pair : entries)
214
- {
215
- for (; current_index <= pair.first && current_index < size; ++current_index)
216
- array.operands ().push_back (pair.second );
217
- }
218
- for (; current_index < size; ++current_index)
219
- array.operands ().push_back (default_value);
212
+ auto it = entries.begin ();
213
+ for (; it != entries.end () && it->first < size; ++it)
214
+ array.operands ().resize (it->first + 1 , it->second );
215
+
216
+ array.operands ().resize (
217
+ size, it == entries.end () ? default_value : it->second );
220
218
return array;
221
219
}
220
+
222
221
void equation_symbol_mappingt::add (const std::size_t i, const exprt &expr)
223
222
{
224
223
equations_containing[expr].push_back (i);
You can’t perform that action at this time.
0 commit comments