mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Fixed several issues found by static analysis
This commit is contained in:
@@ -888,12 +888,14 @@ static void common_matchTemplate( Mat& img, Mat& templ, Mat& result, int method,
|
||||
templNorm = std::sqrt(templNorm);
|
||||
templNorm /= std::sqrt(invArea); // care of accuracy here
|
||||
|
||||
CV_Assert(sqsum.data != NULL);
|
||||
q0 = (double*)sqsum.data;
|
||||
q1 = q0 + templ.cols*cn;
|
||||
q2 = (double*)(sqsum.data + templ.rows*sqsum.step);
|
||||
q3 = q2 + templ.cols*cn;
|
||||
}
|
||||
|
||||
CV_Assert(sum.data != NULL);
|
||||
double* p0 = (double*)sum.data;
|
||||
double* p1 = p0 + templ.cols*cn;
|
||||
double* p2 = (double*)(sum.data + templ.rows*sum.step);
|
||||
|
||||
Reference in New Issue
Block a user