about summary refs log tree commit diff homepage
path: root/lib/Expr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Expr')
-rw-r--r--lib/Expr/Constraints.cpp2
-rw-r--r--lib/Expr/Expr.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Expr/Constraints.cpp b/lib/Expr/Constraints.cpp
index 9c09e643..b759daae 100644
--- a/lib/Expr/Constraints.cpp
+++ b/lib/Expr/Constraints.cpp
@@ -52,7 +52,7 @@ public:
 
   Action visitExprPost(const Expr &e) {
     std::map< ref<Expr>, ref<Expr> >::const_iterator it =
-      replacements.find(ref<Expr>((Expr*) &e));
+      replacements.find(ref<Expr>(const_cast<Expr*>(&e)));
     if (it!=replacements.end()) {
       return Action::changeTo(it->second);
     } else {
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp
index 703c689f..71e64325 100644
--- a/lib/Expr/Expr.cpp
+++ b/lib/Expr/Expr.cpp
@@ -288,7 +288,7 @@ ref<Expr> Expr::createIsZero(ref<Expr> e) {
 }
 
 void Expr::print(std::ostream &os) const {
-  ExprPPrinter::printSingleExpr(os, (Expr*)this);
+  ExprPPrinter::printSingleExpr(os, const_cast<Expr*>(this));
 }
 
 void Expr::dump() const {