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:
parent
234d6eedca
commit
849bfe284f
1 changed files with 3 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ namespace swig {
|
|||
return false;
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
} else {
|
||||
return traits_asptr<Type>::asptr(obj, (Type **)(0));
|
||||
return traits_asptr<Type>::asptr(obj, (Type **)(0)) ? true : false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <class Type>
|
||||
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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue