@@ -45,10 +45,7 @@ bool local_bitvector_analysist::merge(points_tot &a, points_tot &b)
4545 std::max (a.size (), b.size ());
4646
4747 for (std::size_t i=0 ; i<max_index; i++)
48- {
49- if (a[i].merge (b[i]))
50- result=true ;
51- }
48+ result |= a[i].merge (b[i]);
5249
5350 return result;
5451}
@@ -73,7 +70,7 @@ void local_bitvector_analysist::assign_lhs(
7370
7471 if (is_tracked (identifier))
7572 {
76- unsigned dest_pointer= pointers.number (identifier);
73+ const auto dest_pointer = pointers.number (identifier);
7774 flagst rhs_flags=get_rec (rhs, loc_info_src);
7875 loc_info_dest[dest_pointer]=rhs_flags;
7976 }
@@ -128,7 +125,7 @@ local_bitvector_analysist::flagst local_bitvector_analysist::get_rec(
128125 const irep_idt &identifier=to_symbol_expr (rhs).get_identifier ();
129126 if (is_tracked (identifier))
130127 {
131- unsigned src_pointer= pointers.number (identifier);
128+ const auto src_pointer = pointers.number (identifier);
132129 return loc_info_src[src_pointer];
133130 }
134131 else
@@ -242,8 +239,8 @@ void local_bitvector_analysist::build()
242239 if (cfg.nodes .empty ())
243240 return ;
244241
245- work_queuet work_queue;
246- work_queue.push (0 );
242+ std::set<local_cfgt::node_nrt> work_queue;
243+ work_queue.insert (0 );
247244
248245 loc_infos.resize (cfg.nodes .size ());
249246
@@ -258,10 +255,10 @@ void local_bitvector_analysist::build()
258255
259256 while (!work_queue.empty ())
260257 {
261- unsigned loc_nr= work_queue.top ();
258+ const auto loc_nr = * work_queue.begin ();
262259 const local_cfgt::nodet &node=cfg.nodes [loc_nr];
263260 const goto_programt::instructiont &instruction=*node.t ;
264- work_queue.pop ( );
261+ work_queue.erase (work_queue. begin () );
265262
266263 auto &loc_info_src=loc_infos[loc_nr];
267264 auto loc_info_dest=loc_infos[loc_nr];
@@ -338,7 +335,7 @@ void local_bitvector_analysist::build()
338335 {
339336 assert (succ<loc_infos.size ());
340337 if (merge (loc_infos[succ], (loc_info_dest)))
341- work_queue.push (succ);
338+ work_queue.insert (succ);
342339 }
343340 }
344341}
@@ -348,7 +345,7 @@ void local_bitvector_analysist::output(
348345 const goto_functiont &goto_function,
349346 const namespacet &ns) const
350347{
351- unsigned l= 0 ;
348+ std:: size_t l = 0 ;
352349
353350 for (const auto &instruction : goto_function.body .instructions )
354351 {
0 commit comments