diff options
author | David Robillard <d@drobilla.net> | 2010-12-29 00:38:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-29 00:38:26 +0000 |
commit | c52b0560cc0005cfa9030c74ac23d5622ec8bfa3 (patch) | |
tree | 3a0d3b358d41f02e1986d361728e52fff5aeaf60 /src | |
parent | 42b51cce2575fa138fddf1cfd4581bf1d1568b24 (diff) | |
download | resp-c52b0560cc0005cfa9030c74ac23d5622ec8bfa3.tar.gz resp-c52b0560cc0005cfa9030c74ac23d5622ec8bfa3.tar.bz2 resp-c52b0560cc0005cfa9030c74ac23d5622ec8bfa3.zip |
Less code.
git-svn-id: http://svn.drobilla.net/resp/resp@370 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r-- | src/simplify.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/simplify.cpp b/src/simplify.cpp index e27049a..c5b2566 100644 --- a/src/simplify.cpp +++ b/src/simplify.cpp @@ -78,11 +78,7 @@ simplify_match(CEnv& cenv, const ATuple* match) throw() const_cast<ASymbol*>(consTag)->tag(T_LITSYM); cenv.setType(consTag, cenv.tenv.named("Symbol")); - List cond; - cond.push_back(cenv.penv.sym("=")); - cond.push_back(tsym); - cond.push_back(consTag); - + List cond(Cursor(), cenv.penv.sym("="), tsym, consTag, 0); cenv.setType(cond, cenv.tenv.named("Bool")); copyIf.push_back(cond); @@ -91,10 +87,7 @@ simplify_match(CEnv& cenv, const ATuple* match) throw() copyIf.push_back(cenv.penv.sym("__unreachable")); cenv.setTypeSameAs(copyIf, match); - List copy; - copy.push_back(cenv.penv.sym("do")); - copy.push_back(def); - copy.push_back(simplify_if(cenv, copyIf)); + List copy(match->loc, cenv.penv.sym("do"), def.head, simplify_if(cenv, copyIf), 0); cenv.setTypeSameAs(copy, match); return copy; |