Fixed some issues found by static analysis

This commit is contained in:
Maksim Shabunin
2017-09-05 17:10:16 +03:00
parent d25cbaaba8
commit 248e2c7d47
41 changed files with 252 additions and 218 deletions
+4
View File
@@ -143,6 +143,10 @@ protected:
// general
static const float basicSize_;
private:
BRISK_Impl(const BRISK_Impl &); // copy disabled
BRISK_Impl& operator=(const BRISK_Impl &); // assign disabled
};
+1 -1
View File
@@ -218,7 +218,7 @@ void EllipticKeyPoint::calcProjection( const std::vector<EllipticKeyPoint>& src,
dst.resize(src.size());
std::vector<EllipticKeyPoint>::const_iterator srcIt = src.begin();
std::vector<EllipticKeyPoint>::iterator dstIt = dst.begin();
for( ; srcIt != src.end(); ++srcIt, ++dstIt )
for( ; srcIt != src.end() && dstIt != dst.end(); ++srcIt, ++dstIt )
srcIt->calcProjection(H, *dstIt);
}
}
+1 -1
View File
@@ -103,7 +103,7 @@ public:
keypoints.resize(corners.size());
std::vector<Point2f>::const_iterator corner_it = corners.begin();
std::vector<KeyPoint>::iterator keypoint_it = keypoints.begin();
for( ; corner_it != corners.end(); ++corner_it, ++keypoint_it )
for( ; corner_it != corners.end() && keypoint_it != keypoints.end(); ++corner_it, ++keypoint_it )
*keypoint_it = KeyPoint( *corner_it, (float)blockSize );
}
+1
View File
@@ -284,6 +284,7 @@ public:
history->parent_ = h;
}
}
CV_Assert(h != NULL);
h->val = gray_level;
h->size = size;
h->head = head;