Fix bool performance warning for Visual C++

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7011 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-02-28 22:24:22 +00:00
commit 849bfe284f

View file

@ -87,7 +87,7 @@ namespace swig {
return false; return false;
} }
} else { } else {
return traits_asptr<Type>::asptr(obj, (Type **)(0)); return traits_asptr<Type>::asptr(obj, (Type **)(0)) ? true : false;
} }
} }
}; };
@ -105,14 +105,14 @@ namespace swig {
return false; return false;
} }
} else { } else {
return traits_asptr<Type>::asptr(obj, (Type **)(0)); return traits_asptr<Type>::asptr(obj, (Type **)(0)) ? true : false;
} }
} }
}; };
template <class Type> template <class Type>
inline bool asval(PyObject *obj, Type *val) { inline bool asval(PyObject *obj, Type *val) {
return traits_asval<Type>::asval(obj, val); return traits_asval<Type>::asval(obj, val) ? true : false;
} }
template <class Type> template <class Type>