From c698116cf88a9e48085b5741f10db4f8c48e8fe5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 26 Dec 2010 17:56:27 +0000 Subject: Remove AType copy constructor. git-svn-id: http://svn.drobilla.net/resp/resp@354 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/resp.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/resp.hpp') diff --git a/src/resp.hpp b/src/resp.hpp index 197a60b..5cb11b6 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -359,7 +359,6 @@ struct AType : public ATuple { AType(Cursor c, Kind k=EXPR) : ATuple(c), kind(k), id(0) { tag(T_TYPE); } AType(Cursor c, AST* ast, va_list args) : ATuple(c, ast, args), kind(EXPR), id(0) { tag(T_TYPE); } AType(const AST* first, const AST* rest, Cursor c) : ATuple(first, rest, c), kind(EXPR), id(0) { tag(T_TYPE); } - AType(const AType& copy) : ATuple(copy), kind(copy.kind), id(copy.id) { tag(T_TYPE); } AType(const AType& copy, Cursor cur) : ATuple(copy), kind(copy.kind), id(copy.id) { tag(T_TYPE); loc = cur; @@ -612,7 +611,7 @@ struct Subst : public list { out = apply(out->as_type()); return out; } else { - return new AType(*in); + return in; } } } @@ -637,7 +636,7 @@ struct Constraints : public list { Constraints() : list() {} explicit Constraints(const Subst& subst) : list() { FOREACH(Subst::const_iterator, i, subst) - push_back(Constraint(new AType(*i->first), new AType(*i->second))); + push_back(Constraint(i->first, i->second)); } Constraints(const_iterator begin, const_iterator end) : list(begin, end) {} void constrain(TEnv& tenv, const AST* o, const AType* t); -- cgit v1.2.1