From 980fc93b4d3a87b38ec3975db2a5214331c38dda Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Mon, 11 Mar 2013 18:40:40 +0400 Subject: [PATCH] Fix clang + ccache build warnings --- modules/python/src2/cv2.cpp | 10 +++++----- modules/python/src2/cv2.cv.hpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 02e1b46..a650f23 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -510,7 +510,7 @@ static bool pyopencv_to(PyObject* obj, double& value, const char* name = "(c.real); @@ -638,7 +638,7 @@ static inline bool pyopencv_to(PyObject* obj, Point2f& p, const char* name = "(c.real); @@ -989,7 +989,7 @@ static bool pyopencv_to(PyObject *o, cv::flann::IndexParams& p, const char *name const char* value = PyString_AsString(item); p.setString(k, value); } - else if( PyBool_Check(item) ) + else if( !!PyBool_Check(item) ) p.setBool(k, item == Py_True); else if( PyInt_Check(item) ) { diff --git a/modules/python/src2/cv2.cv.hpp b/modules/python/src2/cv2.cv.hpp index 09d3c47..06c37cb 100644 --- a/modules/python/src2/cv2.cv.hpp +++ b/modules/python/src2/cv2.cv.hpp @@ -1158,7 +1158,7 @@ static PyObject* cvseq_map_getitem(PyObject *o, PyObject *item) if (i < 0) i += (int)cvseq_seq_length(o); return cvseq_seq_getitem(o, i); - } else if (PySlice_Check(item)) { + } else if (!!PySlice_Check(item)) { Py_ssize_t start, stop, step, slicelength, cur, i; PyObject* result; @@ -1975,7 +1975,7 @@ struct dims static int convert_to_dim(PyObject *item, int i, dims *dst, CvArr *cva, const char *name = "no_name") { - if (PySlice_Check(item)) { + if (!!PySlice_Check(item)) { Py_ssize_t start, stop, step, slicelength; PySlice_GetIndicesEx((PySliceObject*)item, cvGetDimSize(cva, i), &start, &stop, &step, &slicelength); dst->i[i] = (int)start; -- 2.7.4