unnecessary check and code simplification when emitting value type returns

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6220 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-09-03 22:17:14 +00:00
commit c8698b31e7

View file

@ -36,17 +36,13 @@ void emit_args(SwigType *rt, ParmList *l, Wrapper *f) {
/* Handle return type */
if (rt && (SwigType_type(rt) != T_VOID)) {
if (!CPlusPlus || (CPlusPlus && !SwigType_isclass(rt))) {
SwigType *vt = 0;
vt = cplus_value_type(rt);
if (!vt) {
Wrapper_add_local(f,"result", SwigType_lstr(rt,"result"));
} else {
SwigType *vt = 0;
vt = cplus_value_type(rt);
if (!vt) {
Wrapper_add_local(f,"result", SwigType_lstr(rt,"result"));
} else {
Wrapper_add_local(f,"result", SwigType_lstr(vt,"result"));
Delete(vt);
}
Wrapper_add_local(f,"result", SwigType_lstr(vt,"result"));
Delete(vt);
}
}