Skip to content

Commit 99fb6e1

Browse files
committed
Removed deprecated and unused to_unsigned_integer
It has been deprecated since 9/2018.
1 parent 15d2d53 commit 99fb6e1

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

src/util/arith_tools.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,6 @@ bool to_integer(const constant_exprt &expr, mp_integer &int_value)
9696
return true;
9797
}
9898

99-
/// convert a positive integer expression to an unsigned int
100-
/// \par parameters: a constant expression and a reference to an unsigned int
101-
/// \return an error flag
102-
bool to_unsigned_integer(const constant_exprt &expr, unsigned &uint_value)
103-
{
104-
mp_integer i;
105-
if(to_integer(expr, i))
106-
return true;
107-
if(i<0)
108-
return true;
109-
else
110-
{
111-
uint_value = numeric_cast_v<unsigned>(i);
112-
return false;
113-
}
114-
}
115-
11699
constant_exprt from_integer(
117100
const mp_integer &int_value,
118101
const typet &type)

src/util/arith_tools.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Author: Daniel Kroening, [email protected]
1010
#ifndef CPROVER_UTIL_ARITH_TOOLS_H
1111
#define CPROVER_UTIL_ARITH_TOOLS_H
1212

13-
#include "deprecate.h"
1413
#include "invariant.h"
1514
#include "mp_arith.h"
1615
#include "optional.h"
@@ -23,10 +22,6 @@ class typet;
2322
// returns 'true' on error
2423
bool to_integer(const constant_exprt &expr, mp_integer &int_value);
2524

26-
// returns 'true' on error
27-
DEPRECATED("Use numeric_cast<unsigned>(e) instead")
28-
bool to_unsigned_integer(const constant_exprt &expr, unsigned &uint_value);
29-
3025
/// Numerical cast provides a unified way of converting from one numerical type
3126
/// to another.
3227
/// Generic case doesn't exist, this has to be specialized for different types.

0 commit comments

Comments
 (0)