@@ -408,14 +408,13 @@ void abstract_environmentt::output(
408
408
{
409
409
out << " {\n " ;
410
410
411
- decltype (map)::viewt view;
412
- map.get_view (view);
413
- for (const auto &entry : view)
411
+ for (const auto &entry : map.get_view ())
414
412
{
415
413
out << entry.first << " () -> " ;
416
414
entry.second ->output (out, ai, ns);
417
415
out << " \n " ;
418
416
}
417
+
419
418
out << " }\n " ;
420
419
}
421
420
@@ -426,12 +425,11 @@ exprt abstract_environmentt::to_predicate() const
426
425
if (is_top ())
427
426
return true_exprt ();
428
427
429
- auto predicates = std::vector<exprt> { };
428
+ auto predicates = std::vector<exprt>{ };
430
429
for (const auto &entry : map.get_view ())
431
430
{
432
431
auto sym = entry.first ;
433
432
auto val = entry.second ;
434
-
435
433
auto pred = val->to_predicate (symbol_exprt (sym, val->type ()));
436
434
437
435
predicates.push_back (pred);
@@ -444,9 +442,7 @@ exprt abstract_environmentt::to_predicate() const
444
442
445
443
bool abstract_environmentt::verify () const
446
444
{
447
- decltype (map)::viewt view;
448
- map.get_view (view);
449
- for (const auto &entry : view)
445
+ for (const auto &entry : map.get_view ())
450
446
{
451
447
if (entry.second == nullptr )
452
448
{
@@ -483,9 +479,7 @@ abstract_environmentt::modified_symbols(
483
479
{
484
480
// Find all symbols who have different write locations in each map
485
481
std::vector<abstract_environmentt::map_keyt> symbols_diff;
486
- decltype (first.map )::viewt view;
487
- first.map .get_view (view);
488
- for (const auto &entry : view)
482
+ for (const auto &entry : first.map .get_view ())
489
483
{
490
484
const auto &second_entry = second.map .find (entry.first );
491
485
if (second_entry.has_value ())
@@ -528,10 +522,8 @@ abstract_environmentt::gather_statistics(const namespacet &ns) const
528
522
{
529
523
abstract_object_statisticst statistics = {};
530
524
statistics.number_of_globals = count_globals (ns);
531
- decltype (map)::viewt view;
532
- map.get_view (view);
533
525
abstract_object_visitedt visited;
534
- for (auto const &object : view )
526
+ for (auto const &object : map. get_view () )
535
527
{
536
528
if (visited.find (object.second ) == visited.end ())
537
529
{
0 commit comments