diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2016-11-01 13:20:49 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2016-11-01 13:20:49 -0500 |
commit | 8e0fce94790249ff7aff84ff4500bb96e2ebb9e9 (patch) | |
tree | 25e65718cff712f13688e452ffc1d4b459cd7367 /src/compat | |
parent | 3506b13f4d298095e8405b32b05e838f17dbe809 (diff) |
Working memory leak free version, changes interface to pointers.
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/cvc3_compat.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compat/cvc3_compat.cpp b/src/compat/cvc3_compat.cpp index 8c9992164..0482c99ee 100644 --- a/src/compat/cvc3_compat.cpp +++ b/src/compat/cvc3_compat.cpp @@ -1384,11 +1384,11 @@ void ValidityChecker::dataType(const std::vector<std::string>& names, CompatCheckArgument(names.size() == types.size(), types, "Expected names and types vectors to be of equal " "length."); - vector<CVC4::Datatype> dv; + vector<CVC4::Datatype*> dv; // Set up the datatype specifications. for(unsigned i = 0; i < names.size(); ++i) { - CVC4::Datatype dt(names[i], false); + CVC4::Datatype* dt = new CVC4::Datatype(names[i], false); CompatCheckArgument(constructors[i].size() == selectors[i].size(), "Expected sub-vectors in constructors and selectors " "vectors to match in size."); @@ -1409,13 +1409,14 @@ void ValidityChecker::dataType(const std::vector<std::string>& names, ctor.addArg(selectors[i][j][k], exprToType(types[i][j][k])); } } - dt.addConstructor(ctor); + dt->addConstructor(ctor); } dv.push_back(dt); } // Make the datatypes. - vector<CVC4::DatatypeType> dtts = d_em->mkMutualDatatypeTypes(dv); + vector<CVC4::DatatypeType> dtts; + d_em->mkMutualDatatypeTypes(dv, dtts); // Post-process to register the names of everything with this validity checker. // This is necessary for the compatibility layer because cons/sel operations are |