mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #18243 from alalek:static_code_fixes
This commit is contained in:
@@ -160,7 +160,8 @@ class KNNResultSet : public ResultSet<DistanceType>
|
||||
DistanceType worst_distance_;
|
||||
|
||||
public:
|
||||
KNNResultSet(int capacity_) : capacity(capacity_), count(0)
|
||||
KNNResultSet(int capacity_)
|
||||
: indices(NULL), dists(NULL), capacity(capacity_), count(0), worst_distance_(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -186,6 +187,8 @@ public:
|
||||
|
||||
void addPoint(DistanceType dist, int index) CV_OVERRIDE
|
||||
{
|
||||
CV_DbgAssert(indices);
|
||||
CV_DbgAssert(dists);
|
||||
if (dist >= worst_distance_) return;
|
||||
int i;
|
||||
for (i = count; i > 0; --i) {
|
||||
|
||||
@@ -60,6 +60,7 @@ public:
|
||||
* Constructor.
|
||||
*/
|
||||
StartStopTimer()
|
||||
: startTime(0)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user