diff options
author | David Robillard <d@drobilla.net> | 2010-08-22 19:16:28 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-08-22 19:16:28 +0000 |
commit | b4dba561084b7ce60a8b1cfdb4e3b9de87de8d35 (patch) | |
tree | 4bdd431a1af0885a27c4c4c582bd721862629a84 /src/compile.cpp | |
parent | 6f63ae0e3e9af059c7cac3d3a29e4fb34b0b0e28 (diff) | |
download | resp-b4dba561084b7ce60a8b1cfdb4e3b9de87de8d35.tar.gz resp-b4dba561084b7ce60a8b1cfdb4e3b9de87de8d35.tar.bz2 resp-b4dba561084b7ce60a8b1cfdb4e3b9de87de8d35.zip |
Simplify Engine::startFunction.
git-svn-id: http://svn.drobilla.net/resp/resp@267 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/compile.cpp')
-rw-r--r-- | src/compile.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compile.cpp b/src/compile.cpp index 7a875f3..66c3abe 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -64,11 +64,12 @@ AFn::compile(CEnv& cenv) const throw() { const AType* type = cenv.type(this); CFunc f = cenv.findImpl(this, type); - if (!f) { - f = cenv.engine()->compileFunction(cenv, this, type); - cenv.vals.def(cenv.penv.sym(name), f); - cenv.addImpl(this, f); - } + if (f) + return f; + + f = cenv.engine()->compileFunction(cenv, this, type); + cenv.vals.def(cenv.penv.sym(name), f); + cenv.addImpl(this, f); return f; } |