mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fixed some issues found by static analysis
This commit is contained in:
@@ -573,7 +573,9 @@ Mat LogisticRegressionImpl::remap_labels(const Mat& _labels_i, const map<int, in
|
||||
|
||||
for(int i =0;i<labels.rows;i++)
|
||||
{
|
||||
new_labels.at<int>(i,0) = lmap.find(labels.at<int>(i,0))->second;
|
||||
map<int, int>::const_iterator val = lmap.find(labels.at<int>(i,0));
|
||||
CV_Assert(val != lmap.end());
|
||||
new_labels.at<int>(i,0) = val->second;
|
||||
}
|
||||
return new_labels;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user