File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Date: 2012
1313
1414#include " data_dp.h"
1515
16+ #include < util/invariant.h>
1617#include < util/message.h>
1718
1819#include " abstract_event.h"
@@ -151,7 +152,7 @@ void data_dpt::dp_merge()
151152 it3->eq_class =to;
152153
153154 /* strictly monotonous => converges */
154- assert (initial_size>data.size ());
155+ INVARIANT (initial_size>data.size (), " strictly monotonous => converges " );
155156
156157 /* repeat until classes are disjunct */
157158 dp_merge ();
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Date: 2012
2020#include < iosfwd>
2121
2222#include < util/graph.h>
23+ #include < util/invariant.h>
2324
2425#include " abstract_event.h"
2526#include " data_dp.h"
@@ -213,7 +214,7 @@ class event_grapht
213214 {
214215 critical_cyclet reduced (egraph, id);
215216 this ->hide_internals (reduced);
216- assert (!reduced.data .empty ());
217+ INVARIANT (!reduced.data .empty (), " reduced must not be empty " );
217218 return print_name (reduced, model);
218219 }
219220 else
Original file line number Diff line number Diff line change 1515#include < unordered_map>
1616#include < vector>
1717
18+ #include < util/invariant.h>
1819
1920template <typename T>
2021// NOLINTNEXTLINE(readability/identifiers)
@@ -48,7 +49,7 @@ class numbering final
4849 if (result.second ) // inserted?
4950 {
5051 data.push_back (a);
51- assert (data.size ()==numbers.size ());
52+ INVARIANT (data.size ()==numbers.size (), " vector sizes must match " );
5253 }
5354
5455 return (result.first )->second ;
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ class union_find final
238238 if (n>=uuf.size ())
239239 uuf.resize (numbers.size ());
240240
241- assert (uuf.size ()==numbers.size ());
241+ INVARIANT (uuf.size ()==numbers.size (), " container sizes must match " );
242242
243243 return n;
244244 }
You can’t perform that action at this time.
0 commit comments