summaryrefslogtreecommitdiff
path: root/src/expr/emptyset.cpp
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-07-14 07:33:01 -0700
committerGitHub <noreply@github.com>2020-07-14 09:33:01 -0500
commitc13527bfa6b47ff4675b429b5e7bb7c6f43ff595 (patch)
treef182e942b3bc4ad99a8fdf765959781f1a2570dd /src/expr/emptyset.cpp
parent1cd3c3c5dad84093aa6b2db164798c8fff473fec (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.cpp21
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();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback