summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-08-15 12:16:20 -0700
committerGitHub <noreply@github.com>2018-08-15 12:16:20 -0700
commit2a4827990b1e083a0351f4f86de6889d0bb21719 (patch)
tree57a27ad51a6a6261f875552c22ad8e7419d1d8bb /src/smt
parent3e2a8562b4f76bfe8b43d066bcf18dab0fa6631e (diff)
Remove unused tuple classes (#2313)
Since we are using C++11, we can replace the triple and quad classes with std::tuple.
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index cc6f09801..db4efe89f 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -23,6 +23,7 @@
#include <sstream>
#include <stack>
#include <string>
+#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
@@ -2775,18 +2776,21 @@ void SmtEnginePrivate::finishInit()
Node SmtEnginePrivate::expandDefinitions(TNode n, unordered_map<Node, Node, NodeHashFunction>& cache, bool expandOnly)
{
- stack< triple<Node, Node, bool> > worklist;
+ stack<std::tuple<Node, Node, bool>> worklist;
stack<Node> result;
- worklist.push(make_triple(Node(n), Node(n), false));
+ worklist.push(std::make_tuple(Node(n), Node(n), false));
// The worklist is made of triples, each is input / original node then the output / rewritten node
// and finally a flag tracking whether the children have been explored (i.e. if this is a downward
// or upward pass).
do {
spendResource(options::preprocessStep());
- n = worklist.top().first; // n is the input / original
- Node node = worklist.top().second; // node is the output / result
- bool childrenPushed = worklist.top().third;
+
+ // n is the input / original
+ // node is the output / result
+ Node node;
+ bool childrenPushed;
+ std::tie(n, node, childrenPushed) = worklist.top();
worklist.pop();
// Working downwards
@@ -2910,10 +2914,14 @@ Node SmtEnginePrivate::expandDefinitions(TNode n, unordered_map<Node, Node, Node
// the partial functions can fall through, in which case we still
// consider their children
- worklist.push(make_triple(Node(n), node, true)); // Original and rewritten result
+ worklist.push(std::make_tuple(
+ Node(n), node, true)); // Original and rewritten result
for(size_t i = 0; i < node.getNumChildren(); ++i) {
- worklist.push(make_triple(node[i], node[i], false)); // Rewrite the children of the result only
+ worklist.push(
+ std::make_tuple(node[i],
+ node[i],
+ false)); // Rewrite the children of the result only
}
} else {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback