Skip to content

Commit c880b7e

Browse files
committed
Utilize CV_UNUSED macro
1 parent 8849e07 commit c880b7e

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

modules/bioinspired/src/templatebuffer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ class Parallel_clipBufferValues: public cv::ParallelLoopBody
293293
* @param sensitivity: strenght of the sigmoide
294294
* @param maxOutputValue: the maximum output value
295295
*/
296-
inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0) { (void)maxOutputValue; normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels()); }
296+
inline void normalizeGrayOutputCentredSigmoide(const type meanValue=(type)0.0, const type sensitivity=(type)2.0, const type maxOutputValue=(type)255.0) { CV_UNUSED(maxOutputValue); normalizeGrayOutputCentredSigmoide(meanValue, sensitivity, 255.0, this->Buffer(), this->Buffer(), this->getNBpixels()); }
297297

298298
/**
299299
* sigmoide image normalization function (saturates min and max values), in this function, the sigmoide is centered on low values (high saturation of the medium and high values

modules/face/include/opencv2/face/predict_collector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ the use of this software, even if advised of the possibility of such damage.
5050
#include <utility>
5151
#include <cfloat>
5252

53-
#include "opencv2/core/cvstd.hpp"
53+
#include "opencv2/core/base.hpp"
5454

5555
namespace cv {
5656
namespace face {
@@ -66,7 +66,7 @@ class CV_EXPORTS_W PredictCollector
6666
/** @brief Interface method called by face recognizer before results processing
6767
@param size total size of prediction evaluation that recognizer could perform
6868
*/
69-
virtual void init(size_t size) { (void)size; }
69+
virtual void init(size_t size) { CV_UNUSED(size); }
7070

7171
/** @brief Interface method called by face recognizer for each result
7272
@param label current prediction label

modules/face/src/facerec.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ void FaceRecognizer::setLabelInfo(int label, const String &strInfo)
4848

4949
void FaceRecognizer::update(InputArrayOfArrays src, InputArray labels)
5050
{
51-
(void)src;
52-
(void)labels;
51+
CV_UNUSED(src);
52+
CV_UNUSED(labels);
5353
String error_msg = format("This FaceRecognizer does not support updating, you have to use FaceRecognizer::train to update it.");
5454
CV_Error(Error::StsNotImplemented, error_msg);
5555
}

modules/optflow/src/sparse_matching_gpc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ void getAllDCTDescriptorsForImage( const Mat *imgCh, std::vector< GPCPatchDescri
292292
const Size sz = imgCh[0].size();
293293
descr.reserve( ( sz.height - 2 * patchRadius ) * ( sz.width - 2 * patchRadius ) );
294294

295-
(void)mp; // Fix unused parameter warning in case OpenCL is not available
295+
CV_UNUSED(mp); // Fix unused parameter warning in case OpenCL is not available
296296
CV_OCL_RUN( mp.useOpenCL, ocl_getAllDCTDescriptorsForImage( imgCh, descr ) )
297297

298298
descr.resize( ( sz.height - 2 * patchRadius ) * ( sz.width - 2 * patchRadius ) );

modules/stereo/include/opencv2/stereo/descriptor.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ namespace cv
7979
}
8080
void operator()(int rrWidth,int w2, int rWidth, int jj, int j, int c[num_images]) const
8181
{
82-
(void)w2;
82+
CV_UNUSED(w2);
8383
for (int i = 0; i < stop; i++)
8484
{
8585
if (image[i][rrWidth + jj] > image[i][rWidth + j])
@@ -114,7 +114,7 @@ namespace cv
114114
}
115115
void operator()(int rrWidth,int w2, int rWidth, int jj, int j, int c[num_images]) const
116116
{
117-
(void)w2;
117+
CV_UNUSED(w2);
118118
for(int i = 0; i < imageStop; i++)
119119
{
120120
if (image[i][rrWidth + jj] > image[i][rWidth + j] - t)
@@ -154,8 +154,8 @@ namespace cv
154154
}
155155
void operator()(int rrWidth,int w2, int rWidth, int jj, int j, int c[num_images]) const
156156
{
157-
(void)j;
158-
(void)rWidth;
157+
CV_UNUSED(j);
158+
CV_UNUSED(rWidth);
159159
for(int i = 0; i < imageStop; i++)
160160
{
161161
if (image[i][(rrWidth + jj)] > image[i][(w2 + (jj + n2))])
@@ -181,7 +181,7 @@ namespace cv
181181
}
182182
void operator()(int rrWidth,int w2, int rWidth, int jj, int j, int c[num_images]) const
183183
{
184-
(void)w2;
184+
CV_UNUSED(w2);
185185
for(int i = 0; i < imageStop; i++)
186186
{
187187
////compare a pixel with the center from the kernel

modules/structured_light/src/sinusoidalpattern.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ bool SinusoidalPatternProfilometry_Impl::decode(const std::vector< std::vector<M
263263
InputArrayOfArrays blackImages,
264264
InputArrayOfArrays whiteImages, int flags ) const
265265
{
266-
(void) patternImages;
267-
(void) disparityMap;
268-
(void) blackImages;
269-
(void) whiteImages;
270-
(void) flags;
266+
CV_UNUSED(patternImages);
267+
CV_UNUSED(disparityMap);
268+
CV_UNUSED(blackImages);
269+
CV_UNUSED(whiteImages);
270+
CV_UNUSED(flags);
271271
return true;
272272
}
273273
// Most of the steps described in the paper to get the wrapped phase map take place here
@@ -310,7 +310,7 @@ void SinusoidalPatternProfilometry_Impl::computePhaseMap( InputArrayOfArrays pat
310310
{
311311
Mat &shadowMask_ = *(Mat*) shadowMask.getObj();
312312
//Mat &fundamental_ = *(Mat*) fundamental.getObj();
313-
(void) fundamental;
313+
CV_UNUSED(fundamental);
314314
Mat dmt;
315315
int nbrOfPatterns = static_cast<int>(pattern_.size());
316316
std::vector<Mat> filteredPatterns(nbrOfPatterns);
@@ -425,9 +425,9 @@ void SinusoidalPatternProfilometry_Impl::findProCamMatches( InputArray projUnwra
425425
InputArray camUnwrappedPhaseMap,
426426
OutputArrayOfArrays matches )
427427
{
428-
(void) projUnwrappedPhaseMap;
429-
(void) camUnwrappedPhaseMap;
430-
(void) matches;
428+
CV_UNUSED(projUnwrappedPhaseMap);
429+
CV_UNUSED(camUnwrappedPhaseMap);
430+
CV_UNUSED(matches);
431431
}
432432

433433
void SinusoidalPatternProfilometry_Impl::computeDft( InputArray patternImage,
@@ -896,8 +896,8 @@ void SinusoidalPatternProfilometry_Impl::convertToAbsolutePhaseMap( InputArrayOf
896896
InputArray fundamentalMatrix )
897897
{
898898
std::vector<Mat> &camPatterns_ = *(std::vector<Mat>*) camPatterns.getObj();
899-
(void) unwrappedCamPhaseMap;
900-
(void) unwrappedProjPhaseMap;
899+
CV_UNUSED(unwrappedCamPhaseMap);
900+
CV_UNUSED(unwrappedProjPhaseMap);
901901

902902
Mat &fundamental = *(Mat*) fundamentalMatrix.getObj();
903903

modules/text/src/ocr_tesseract.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ class OCRTesseractImpl CV_FINAL : public OCRTesseract
262262
#ifdef HAVE_TESSERACT
263263
tess.SetVariable("tessedit_char_whitelist", char_whitelist.c_str());
264264
#else
265-
(void)char_whitelist;
265+
CV_UNUSED(char_whitelist);
266266
#endif
267267
}
268268
};

0 commit comments

Comments
 (0)