Skip to content

Commit 775d9dd

Browse files
NathanJPhillipssmowton
authored andcommitted
Renamed can_cast_expr
1 parent c372eb3 commit 775d9dd

File tree

2 files changed

+62
-62
lines changed

2 files changed

+62
-62
lines changed

src/util/expr_cast.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// \tparam T The exprt-derived class to check for
2222
/// \param base Reference to a generic \ref exprt
2323
/// \return true if \a base is of type \a T
24-
template<typename T> bool check_expr_type(const exprt &base);
24+
template<typename T> bool can_cast_expr(const exprt &base);
2525

2626

2727
/// \brief Cast a constant pointer to a generic exprt to a specific derived
@@ -70,7 +70,7 @@ T expr_dynamic_cast(TExpr *base)
7070
"The template argument T must be derived from exprt.");
7171
if(base == nullptr)
7272
return nullptr;
73-
if(!check_expr_type<TUnderlying>(*base))
73+
if(!can_cast_expr<TUnderlying>(*base))
7474
return nullptr;
7575
T value=static_cast<T>(base);
7676
validate_expr(*value);
@@ -121,7 +121,7 @@ T expr_dynamic_cast(TExpr &base)
121121
static_assert(
122122
std::is_base_of<exprt, TUnderlying>::value,
123123
"The template argument T must be derived from exprt.");
124-
if(!check_expr_type<TUnderlying>(base))
124+
if(!can_cast_expr<TUnderlying>(base))
125125
throw std::bad_cast();
126126
T value=static_cast<T>(base);
127127
validate_expr(value);

0 commit comments

Comments
 (0)