Fix cppcheck reports warnings:

(performance) Possible inefficient checking for 'lmap' emptiness
(warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
(style) Array index '<xxx>' is used before limits check
This commit is contained in:
Julien Nabet
2014-12-27 10:54:34 +01:00
parent 61991a3330
commit 2d5e3b57ea
4 changed files with 5 additions and 5 deletions

View File

@@ -542,7 +542,7 @@ Mat LogisticRegressionImpl::remap_labels(const Mat& _labels_i, const map<int, in
Mat new_labels = Mat::zeros(labels.rows, labels.cols, labels.type());
CV_Assert( lmap.size() > 0 );
CV_Assert( !lmap.empty() );
for(int i =0;i<labels.rows;i++)
{