diff --git a/src/util/arith_tools.cpp b/src/util/arith_tools.cpp index df997b48a51..1f05e2ed42a 100644 --- a/src/util/arith_tools.cpp +++ b/src/util/arith_tools.cpp @@ -96,23 +96,6 @@ bool to_integer(const constant_exprt &expr, mp_integer &int_value) return true; } -/// convert a positive integer expression to an unsigned int -/// \par parameters: a constant expression and a reference to an unsigned int -/// \return an error flag -bool to_unsigned_integer(const constant_exprt &expr, unsigned &uint_value) -{ - mp_integer i; - if(to_integer(expr, i)) - return true; - if(i<0) - return true; - else - { - uint_value = numeric_cast_v(i); - return false; - } -} - constant_exprt from_integer( const mp_integer &int_value, const typet &type) diff --git a/src/util/arith_tools.h b/src/util/arith_tools.h index 395ab9b5f62..4f67c810b92 100644 --- a/src/util/arith_tools.h +++ b/src/util/arith_tools.h @@ -10,7 +10,6 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_UTIL_ARITH_TOOLS_H #define CPROVER_UTIL_ARITH_TOOLS_H -#include "deprecate.h" #include "invariant.h" #include "mp_arith.h" #include "optional.h" @@ -26,10 +25,6 @@ class typet; /// \return False if, and only if, the conversion was successful. bool to_integer(const constant_exprt &expr, mp_integer &int_value); -// returns 'true' on error -DEPRECATED(SINCE(2018, 9, 29, "Use numeric_cast(e) instead")) -bool to_unsigned_integer(const constant_exprt &expr, unsigned &uint_value); - /// Numerical cast provides a unified way of converting from one numerical type /// to another. /// Generic case doesn't exist, this has to be specialized for different types.