Fix issues found by static analysis
This commit is contained in:
parent
e12adcdf08
commit
1b0dca9c2c
@ -286,7 +286,7 @@ public:
|
||||
current_score = quality->getScore(models[i]);
|
||||
} else {
|
||||
if (is_magsac && iters % repeat_magsac == 0) {
|
||||
if (!local_optimization->refineModel
|
||||
if (local_optimization && !local_optimization->refineModel
|
||||
(models[i], best_score_thread, models[i], current_score))
|
||||
continue;
|
||||
} else if (model_verifier->isModelGood(models[i])) {
|
||||
@ -1028,4 +1028,4 @@ bool run (const Ptr<const Model> ¶ms, InputArray points1, InputArray points2
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}}
|
||||
}}
|
||||
|
||||
@ -531,14 +531,14 @@ template<typename T> struct DFT_R5
|
||||
template<typename T> struct DFT_VecR2
|
||||
{
|
||||
void operator()(Complex<T>* dst, const int c_n, const int n, const int dw0, const Complex<T>* wave) const {
|
||||
return DFT_R2<T>()(dst, c_n, n, dw0, wave);
|
||||
DFT_R2<T>()(dst, c_n, n, dw0, wave);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T> struct DFT_VecR3
|
||||
{
|
||||
void operator()(Complex<T>* dst, const int c_n, const int n, const int dw0, const Complex<T>* wave) const {
|
||||
return DFT_R3<T>()(dst, c_n, n, dw0, wave);
|
||||
DFT_R3<T>()(dst, c_n, n, dw0, wave);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -252,7 +252,7 @@ struct Mosaic
|
||||
{
|
||||
}
|
||||
|
||||
Mosaic() = default;
|
||||
Mosaic() : cellSz(0), decim(0) {}
|
||||
|
||||
/*@{*/
|
||||
cv::Rect mos; //!< Coordinates of the mosaic
|
||||
|
||||
@ -1122,7 +1122,7 @@ bool QRDecode::computeClosestPoints(const vector<Point> &result_integer_hull)
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
double min_norm, max_norm = 0.0;
|
||||
size_t idx_min;
|
||||
size_t idx_min = (size_t)-1;
|
||||
for (size_t i = 0; i < original_points.size(); i++)
|
||||
{
|
||||
min_norm = std::numeric_limits<double>::max();
|
||||
@ -1144,6 +1144,7 @@ bool QRDecode::computeClosestPoints(const vector<Point> &result_integer_hull)
|
||||
max_norm = min_norm;
|
||||
unstable_pair = std::pair<size_t,Point>(i, closest_pnt);
|
||||
}
|
||||
CV_Assert(idx_min != (size_t)-1);
|
||||
closest_points.push_back(std::pair<size_t,Point>(idx_min, closest_pnt));
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user