Fix some clang 14 warnings

This commit is contained in:
Maksim Shabunin
2023-02-06 22:17:50 +03:00
parent 9eb78eeb18
commit e4acd74e87
14 changed files with 47 additions and 41 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ struct Data
bool doTrain(const Mat samples, const Mat responses, Mat &weights, float &shift);
//function finds two points for drawing line (wx = 0)
bool findPointsForLine(const Mat &weights, float shift, Point points[], int width, int height);
bool findPointsForLine(const Mat &weights, float shift, Point points[2], int width, int height);
// function finds cross point of line (wx = 0) and segment ( (y = HEIGHT, 0 <= x <= WIDTH) or (x = WIDTH, 0 <= y <= HEIGHT) )
bool findCrossPointWithBorders(const Mat &weights, float shift, const std::pair<Point,Point> &segment, Point &crossPoint);
+1 -1
View File
@@ -157,7 +157,7 @@ static void onMouse(int event, int x, int y, int, void*)
{
for (int i = 0; i < 4; ++i)
{
if ((event == EVENT_LBUTTONDOWN) & ((abs(roi_corners[i].x - x) < 10)) & (abs(roi_corners[i].y - y) < 10))
if ((event == EVENT_LBUTTONDOWN) && ((abs(roi_corners[i].x - x) < 10)) && (abs(roi_corners[i].y - y) < 10))
{
selected_corner_index = i;
dragging = true;