File tree Expand file tree Collapse file tree 1 file changed +6
-20
lines changed Expand file tree Collapse file tree 1 file changed +6
-20
lines changed Original file line number Diff line number Diff line change @@ -245,18 +245,9 @@ Function: exprt::is_true
245
245
246
246
bool exprt::is_true () const
247
247
{
248
- if (is_constant ())
249
- {
250
- if (type ().id ()==ID_bool)
251
- return get (ID_value)!=ID_false;
252
- else if (type ().id ()==ID_c_bool)
253
- {
254
- mp_integer i;
255
- to_integer (*this , i);
256
- return i!=mp_integer (0 );
257
- }
258
- }
259
- return false ;
248
+ return is_constant () &&
249
+ type ().id ()==ID_bool &&
250
+ get (ID_value)!=ID_false;
260
251
}
261
252
262
253
/* ******************************************************************\
@@ -273,14 +264,9 @@ Function: exprt::is_false
273
264
274
265
bool exprt::is_false () const
275
266
{
276
- if (is_constant ())
277
- {
278
- if (type ().id ()==ID_bool)
279
- return get (ID_value)==ID_false;
280
- else if (type ().id ()==ID_c_bool)
281
- return !is_true ();
282
- }
283
- return false ;
267
+ return is_constant () &&
268
+ type ().id ()==ID_bool &&
269
+ get (ID_value)==ID_false;
284
270
}
285
271
286
272
/* ******************************************************************\
You can’t perform that action at this time.
0 commit comments