Skip to content

Commit 4e10bc5

Browse files
jbeichalalek
authored andcommitted
stereo: unbreak with clang 7
modules/stereo/src/descriptor.cpp:229:34: error: ordered comparison between pointer and zero ('const int *' and 'int') CV_Assert(image.size > 0); ~~~~~~~~~~ ^ ~ modules/core/include/opencv2/core/base.hpp:478:84: note: expanded from macro 'CV_Assert' #define CV_Assert(...) do { CVAUX_CONCAT(CV_Assert_, CV_VA_NUM_ARGS(__VA_ARGS__)) (__VA_ARGS__); } while(0) ^~~~~~~~~~~ modules/core/include/opencv2/core/base.hpp:455:35: note: expanded from macro 'CV_Assert_1' #define CV_Assert_1( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ) ^~~~ modules/stereo/src/descriptor.cpp:230:33: error: ordered comparison between pointer and zero ('const int *' and 'int') CV_Assert(cost.size > 0); ~~~~~~~~~ ^ ~ modules/core/include/opencv2/core/base.hpp:478:84: note: expanded from macro 'CV_Assert' #define CV_Assert(...) do { CVAUX_CONCAT(CV_Assert_, CV_VA_NUM_ARGS(__VA_ARGS__)) (__VA_ARGS__); } while(0) ^~~~~~~~~~~ modules/core/include/opencv2/core/base.hpp:455:35: note: expanded from macro 'CV_Assert_1' #define CV_Assert_1( expr ) if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ) ^~~~
1 parent f368d83 commit 4e10bc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/stereo/src/descriptor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ namespace cv
226226
//integral image computation used in the Mean Variation Census Transform
227227
void imageMeanKernelSize(const Mat &image, int windowSize, Mat &cost)
228228
{
229-
CV_Assert(image.size > 0);
230-
CV_Assert(cost.size > 0);
229+
CV_Assert(!image.empty());
230+
CV_Assert(!cost.empty());
231231
CV_Assert(windowSize % 2 != 0);
232232
int win = windowSize / 2;
233233
float scalling = ((float) 1) / (windowSize * windowSize);

0 commit comments

Comments
 (0)