Fix bool performance warning for Visual C++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7011 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
725d5550f9
commit
bb80ee9ac9
1 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue