Code Cleanup: int pointer comparison
This commit is contained in:
parent
811ce5a696
commit
41e563594d
|
@ -204,7 +204,6 @@ void Controller::setPassZ(float *buf, int width, int height)
|
|||
void Controller::setContext(bContext *C)
|
||||
{
|
||||
PythonInterpreter *py_inter = dynamic_cast<PythonInterpreter*>(_inter);
|
||||
assert(py_inter != 0);
|
||||
py_inter->setContext(C);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ PyDoc_STRVAR(ChainPredicateIterator_doc,
|
|||
|
||||
static int check_begin(PyObject *obj, void *v)
|
||||
{
|
||||
if (obj != 0 && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
return 0;
|
||||
*((PyObject **)v) = obj;
|
||||
return 1;
|
||||
|
|
|
@ -74,7 +74,7 @@ PyDoc_STRVAR(ChainSilhouetteIterator_doc,
|
|||
|
||||
static int check_begin(PyObject *obj, void *v)
|
||||
{
|
||||
if (obj != 0 && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
return 0;
|
||||
*((PyObject **)v) = obj;
|
||||
return 1;
|
||||
|
|
|
@ -75,7 +75,7 @@ PyDoc_STRVAR(ChainingIterator_doc,
|
|||
|
||||
static int check_begin(PyObject *obj, void *v)
|
||||
{
|
||||
if (obj != 0 && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
return 0;
|
||||
*((PyObject **)v) = obj;
|
||||
return 1;
|
||||
|
|
|
@ -65,7 +65,7 @@ PyDoc_STRVAR(ViewEdgeIterator_doc,
|
|||
|
||||
static int check_begin(PyObject *obj, void *v)
|
||||
{
|
||||
if (obj != 0 && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
if (obj != NULL && obj != Py_None && !BPy_ViewEdge_Check(obj))
|
||||
return 0;
|
||||
*((PyObject **)v) = obj;
|
||||
return 1;
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace Freestyle {
|
|||
|
||||
void ViewEdgeXBuilder::Init(ViewShape *oVShape)
|
||||
{
|
||||
if (0 == oVShape)
|
||||
if (NULL == oVShape)
|
||||
return;
|
||||
|
||||
// for design conveniance, we store the current SShape.
|
||||
|
@ -527,7 +527,7 @@ FEdge *ViewEdgeXBuilder::BuildSmoothFEdge(FEdge *feprevious, const OWXFaceLayer&
|
|||
|
||||
bool ViewEdgeXBuilder::stopSmoothViewEdge(WXFaceLayer *iFaceLayer)
|
||||
{
|
||||
if (0 == iFaceLayer)
|
||||
if (NULL == iFaceLayer)
|
||||
return true;
|
||||
if (iFaceLayer->userdata == 0)
|
||||
return false;
|
||||
|
@ -698,7 +698,7 @@ FEdge *ViewEdgeXBuilder::BuildSharpFEdge(FEdge *feprevious, const OWXEdge& iwe)
|
|||
|
||||
bool ViewEdgeXBuilder::stopSharpViewEdge(WXEdge *iEdge)
|
||||
{
|
||||
if (0 == iEdge)
|
||||
if (NULL == iEdge)
|
||||
return true;
|
||||
if (iEdge->userdata == 0)
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue