warning warningC4018 signed/unsigned mismatch

C++ warning 

warning C4018: "<": signed/unsigned mismatch   

The warning code is as follows:

		for (int i = 0; i<matchePoints.size(); i++)
		{
			imagePoints1.push_back(keypoints1[matchePoints[i].Idx1].pt);
			imagePoints2.push_back(keypoints2[matchePoints[i].Idx2].pt);
		}

wrong reason:

matchPoint is a Vector container, matchPoint .size() is defined in the container specification as: unsigned int type, and i is int type, so there will be: signed/unsigned mismatch warning

Modification method: Change i to unsigned int type .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324764755&siteId=291194637