summaryrefslogtreecommitdiff
path: root/src/expr/expr_template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/expr_template.cpp')
-rw-r--r--src/expr/expr_template.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp
index 9fbdc81d6..6dbc2256c 100644
--- a/src/expr/expr_template.cpp
+++ b/src/expr/expr_template.cpp
@@ -399,22 +399,22 @@ Expr Expr::substitute(const std::unordered_map<Expr, Expr, ExprHashFunction> map
return Expr(d_exprManager, new Node(d_node->substitute(mkNodePairIteratorAdaptor(map.begin()), mkNodePairIteratorAdaptor(map.end()))));
}
-Expr::const_iterator::const_iterator() :
- d_iterator(NULL) {
-}
-Expr::const_iterator::const_iterator(ExprManager* em, void* v) :
- d_exprManager(em),
- d_iterator(v) {
-}
-Expr::const_iterator::const_iterator(const const_iterator& it) {
- if(it.d_iterator == NULL) {
- d_iterator = NULL;
- } else {
+Expr::const_iterator::const_iterator()
+ : d_exprManager(nullptr), d_iterator(nullptr) {}
+
+Expr::const_iterator::const_iterator(ExprManager* em, void* v)
+ : d_exprManager(em), d_iterator(v) {}
+
+Expr::const_iterator::const_iterator(const const_iterator& it)
+ : d_exprManager(nullptr), d_iterator(nullptr) {
+ if (it.d_iterator != nullptr) {
d_exprManager = it.d_exprManager;
ExprManagerScope ems(*d_exprManager);
- d_iterator = new Node::iterator(*reinterpret_cast<Node::iterator*>(it.d_iterator));
+ d_iterator =
+ new Node::iterator(*reinterpret_cast<Node::iterator*>(it.d_iterator));
}
}
+
Expr::const_iterator& Expr::const_iterator::operator=(const const_iterator& it) {
if(d_iterator != NULL) {
ExprManagerScope ems(*d_exprManager);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback