diff options
author | Tim King <taking@cs.nyu.edu> | 2017-07-20 17:04:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 17:04:30 -0700 |
commit | 8b0659e6cd342ae40b676781b5e819d5fd2b3af7 (patch) | |
tree | 5ac55f64d115b3e8865ce8f691f38da65fc82a94 /src/compat/cvc3_compat.cpp | |
parent | 6d82ee2d1f84065ff4a86f688a3b671b85728f80 (diff) |
Moving from the gnu extensions for hash maps to the c++11 hash maps
* Replacing __gnu_cxx::hash_map with std::unordered_map.
* Replacing __gnu_cxx::hash_set with std::unordered_set.
* Replacing __gnu_cxx::hash with std::hash.
* Adding missing includes.
Diffstat (limited to 'src/compat/cvc3_compat.cpp')
-rw-r--r-- | src/compat/cvc3_compat.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/compat/cvc3_compat.cpp b/src/compat/cvc3_compat.cpp index 3309ce442..ffb299394 100644 --- a/src/compat/cvc3_compat.cpp +++ b/src/compat/cvc3_compat.cpp @@ -21,7 +21,6 @@ #include <iosfwd> #include <iterator> #include <sstream> -#include <string> #include "base/exception.h" #include "base/output.h" @@ -33,9 +32,6 @@ #include "parser/parser_builder.h" #include "smt/command.h" #include "util/bitvector.h" -#include "util/hash.h" -#include "util/integer.h" -#include "util/rational.h" #include "util/sexpr.h" #include "util/subrange_bound.h" @@ -60,22 +56,22 @@ namespace CVC3 { // ExprManager-to-ExprManager import). static std::map<CVC4::ExprManager*, ValidityChecker*> s_validityCheckers; -static std::hash_map<Type, Expr, CVC4::TypeHashFunction> s_typeToExpr; -static std::hash_map<Expr, Type, CVC4::ExprHashFunction> s_exprToType; +static std::unordered_map<Type, Expr, CVC4::TypeHashFunction> s_typeToExpr; +static std::unordered_map<Expr, Type, CVC4::ExprHashFunction> s_exprToType; static bool typeHasExpr(const Type& t) { - std::hash_map<Type, Expr, CVC4::TypeHashFunction>::const_iterator i = s_typeToExpr.find(t); + std::unordered_map<Type, Expr, CVC4::TypeHashFunction>::const_iterator i = s_typeToExpr.find(t); return i != s_typeToExpr.end(); } static Expr typeToExpr(const Type& t) { - std::hash_map<Type, Expr, CVC4::TypeHashFunction>::const_iterator i = s_typeToExpr.find(t); + std::unordered_map<Type, Expr, CVC4::TypeHashFunction>::const_iterator i = s_typeToExpr.find(t); assert(i != s_typeToExpr.end()); return (*i).second; } static Type exprToType(const Expr& e) { - std::hash_map<Expr, Type, CVC4::ExprHashFunction>::const_iterator i = s_exprToType.find(e); + std::unordered_map<Expr, Type, CVC4::ExprHashFunction>::const_iterator i = s_exprToType.find(e); assert(i != s_exprToType.end()); return (*i).second; } @@ -311,8 +307,8 @@ Expr Expr::substExpr(const std::vector<Expr>& oldTerms, } Expr Expr::substExpr(const ExprHashMap<Expr>& oldToNew) const { - const hash_map<CVC4::Expr, CVC4::Expr, CVC4::ExprHashFunction>& o2n = - *reinterpret_cast<const hash_map<CVC4::Expr, CVC4::Expr, CVC4::ExprHashFunction>*>(&oldToNew); + const unordered_map<CVC4::Expr, CVC4::Expr, CVC4::ExprHashFunction>& o2n = + *reinterpret_cast<const unordered_map<CVC4::Expr, CVC4::Expr, CVC4::ExprHashFunction>*>(&oldToNew); return Expr(substitute(o2n)); } |