diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2017-07-17 01:18:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 01:18:10 -0400 |
commit | efac53e969ccefc01bace1a5f095dfd3570c3767 (patch) | |
tree | 0cfcf50944619bc0e7c452f9aa918a56ebd3d540 /src/expr | |
parent | 949e19cbc2881996e5c5eed613f4506264482039 (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.h | 10 |
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(); } |