From f3f0e06c4dd4b27c98a6277ee8522399286d1810 Mon Sep 17 00:00:00 2001 From: Ievgen Khvedchenia Date: Mon, 28 Apr 2014 10:51:09 +0300 Subject: [PATCH] Fix parenthesis in assert statements --- modules/features2d/src/akaze.cpp | 7 +++++-- modules/features2d/src/kaze.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/features2d/src/akaze.cpp b/modules/features2d/src/akaze.cpp index 2083ce8d7f..4d4c744b1a 100644 --- a/modules/features2d/src/akaze.cpp +++ b/modules/features2d/src/akaze.cpp @@ -99,6 +99,9 @@ namespace cv } impl.Compute_Descriptors(keypoints, desc); + + CV_Assert((!desc.rows || desc.cols == descriptorSize()) && "Descriptor size does not match expected"); + CV_Assert((!desc.rows || (desc.type() & descriptorType())) && "Descriptor type does not match expected"); } void AKAZE::detectImpl(InputArray image, std::vector& keypoints, InputArray mask) const @@ -143,7 +146,7 @@ namespace cv impl.Create_Nonlinear_Scale_Space(img1_32); impl.Compute_Descriptors(keypoints, desc); - CV_Assert(!desc.rows || desc.cols == descriptorSize() && "Descriptor size does not match expected"); - CV_Assert(!desc.rows || (desc.type() & descriptorType()) && "Descriptor type does not match expected"); + CV_Assert((!desc.rows || desc.cols == descriptorSize()) && "Descriptor size does not match expected"); + CV_Assert((!desc.rows || (desc.type() & descriptorType())) && "Descriptor type does not match expected"); } } \ No newline at end of file diff --git a/modules/features2d/src/kaze.cpp b/modules/features2d/src/kaze.cpp index 3bba8795a4..e49e1d2d78 100644 --- a/modules/features2d/src/kaze.cpp +++ b/modules/features2d/src/kaze.cpp @@ -70,8 +70,8 @@ namespace cv impl.Feature_Description(keypoints, desc); - CV_Assert(!desc.rows || desc.cols == descriptorSize() && "Descriptor size does not match expected"); - CV_Assert(!desc.rows || (desc.type() & descriptorType()) && "Descriptor type does not match expected"); + CV_Assert((!desc.rows || desc.cols == descriptorSize()) && "Descriptor size does not match expected"); + CV_Assert((!desc.rows || (desc.type() & descriptorType())) && "Descriptor type does not match expected"); } void KAZE::detectImpl(InputArray image, std::vector& keypoints, InputArray mask) const @@ -118,7 +118,7 @@ namespace cv impl.Create_Nonlinear_Scale_Space(img1_32); impl.Feature_Description(keypoints, desc); - CV_Assert(!desc.rows || desc.cols == descriptorSize() && "Descriptor size does not match expected"); - CV_Assert(!desc.rows || (desc.type() & descriptorType()) && "Descriptor type does not match expected"); + CV_Assert((!desc.rows || desc.cols == descriptorSize()) && "Descriptor size does not match expected"); + CV_Assert((!desc.rows || (desc.type() & descriptorType())) && "Descriptor type does not match expected"); } } \ No newline at end of file