From 709d683926f8446c79eadfcd23fa677bd715b1de Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 24 Nov 2012 14:12:57 +0000 Subject: [PATCH] Minor code optimisation git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13934 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules/allocate.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Modules/allocate.cxx b/Source/Modules/allocate.cxx index 81a732638..8c8450312 100644 --- a/Source/Modules/allocate.cxx +++ b/Source/Modules/allocate.cxx @@ -336,15 +336,13 @@ class Allocate:public Dispatcher { String *name = Getattr(nn, "name"); if (!name) continue; + if (Strchr(name, '~')) + continue; /* Don't care about destructors */ String *base_decl = Getattr(nn, "decl"); if (base_decl) base_decl = SwigType_typedef_resolve_all(base_decl); - if (Strchr(name, '~')) - continue; /* Don't care about destructors */ - - if (SwigType_isfunction(base_decl)) { + if (SwigType_isfunction(base_decl)) search_decl = SwigType_pop_function(base_decl); - } Node *dn = Swig_symbol_clookup_local_check(name, 0, check_implemented); Delete(search_decl); Delete(base_decl); @@ -415,7 +413,7 @@ class Allocate:public Dispatcher { match = 1; break; } - if ((!symname || (!Getattr(e, "sym:name"))) && (Cmp(name, Getattr(e, "name")) == 0)) { + if (!Getattr(e, "sym:name") && (Cmp(name, Getattr(e, "name")) == 0)) { match = 1; break; }