summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2017-07-17 01:18:10 -0400
committerGitHub <noreply@github.com>2017-07-17 01:18:10 -0400
commitefac53e969ccefc01bace1a5f095dfd3570c3767 (patch)
tree0cfcf50944619bc0e7c452f9aa918a56ebd3d540 /src/expr
parent949e19cbc2881996e5c5eed613f4506264482039 (diff)
Remove PtrCloser (#198)
With C++11, we don't need PtrCloser anymore because we can just use std::unique_ptr.
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/node_builder.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/expr/node_builder.h b/src/expr/node_builder.h
index 8d8fba43c..57cfa0221 100644
--- a/src/expr/node_builder.h
+++ b/src/expr/node_builder.h
@@ -155,10 +155,11 @@
#ifndef __CVC4__NODE_BUILDER_H
#define __CVC4__NODE_BUILDER_H
-#include <iostream>
-#include <vector>
#include <cstdlib>
+#include <iostream>
+#include <memory>
#include <stdint.h>
+#include <vector>
namespace CVC4 {
static const unsigned default_nchild_thresh = 10;
@@ -171,7 +172,6 @@ namespace CVC4 {
#include "base/cvc4_assert.h"
#include "base/output.h"
-#include "base/ptr_closer.h"
#include "expr/kind.h"
#include "expr/metakind.h"
#include "expr/node_value.h"
@@ -890,14 +890,14 @@ template <unsigned nchild_thresh>
Node* NodeBuilder<nchild_thresh>::constructNodePtr() {
// maybeCheckType() can throw an exception. Make sure to call the destructor
// on the exception branch.
- PtrCloser<Node> np(new Node(constructNV()));
+ std::unique_ptr<Node> np(new Node(constructNV()));
maybeCheckType(*np.get());
return np.release();
}
template <unsigned nchild_thresh>
Node* NodeBuilder<nchild_thresh>::constructNodePtr() const {
- PtrCloser<Node> np(new Node(constructNV()));
+ std::unique_ptr<Node> np(new Node(constructNV()));
maybeCheckType(*np.get());
return np.release();
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback