diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-07-14 07:33:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 09:33:01 -0500 |
commit | c13527bfa6b47ff4675b429b5e7bb7c6f43ff595 (patch) | |
tree | f182e942b3bc4ad99a8fdf765959781f1a2570dd /src/expr/emptyset.cpp | |
parent | 1cd3c3c5dad84093aa6b2db164798c8fff473fec (diff) |
Use TypeNode in EmptySet (#4740)
This commit changes EmptySet to use TypeNode instead of Type.
Diffstat (limited to 'src/expr/emptyset.cpp')
-rw-r--r-- | src/expr/emptyset.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/expr/emptyset.cpp b/src/expr/emptyset.cpp index 1c8950b55..6260e4373 100644 --- a/src/expr/emptyset.cpp +++ b/src/expr/emptyset.cpp @@ -17,10 +17,9 @@ #include "expr/emptyset.h" -#include <iosfwd> +#include <iostream> -#include "expr/expr.h" -#include "expr/type.h" +#include "expr/type_node.h" namespace CVC4 { @@ -29,30 +28,24 @@ std::ostream& operator<<(std::ostream& out, const EmptySet& asa) { } size_t EmptySetHashFunction::operator()(const EmptySet& es) const { - return TypeHashFunction()(es.getType()); + return TypeNodeHashFunction()(es.getType()); } /** * Constructs an emptyset of the specified type. Note that the argument * is the type of the set itself, NOT the type of the elements. */ -EmptySet::EmptySet(const SetType& setType) - : d_type(new SetType(setType)) -{ } +EmptySet::EmptySet(const TypeNode& setType) : d_type(new TypeNode(setType)) {} -EmptySet::EmptySet(const EmptySet& es) - : d_type(new SetType(es.getType())) -{ } +EmptySet::EmptySet(const EmptySet& es) : d_type(new TypeNode(es.getType())) {} EmptySet& EmptySet::operator=(const EmptySet& es) { (*d_type) = es.getType(); return *this; } -EmptySet::~EmptySet() { delete d_type; } -const SetType& EmptySet::getType() const { - return *d_type; -} +EmptySet::~EmptySet() {} +const TypeNode& EmptySet::getType() const { return *d_type; } bool EmptySet::operator==(const EmptySet& es) const { return getType() == es.getType(); |