blob: 40fff14054c03a19f3c935a5a7a561170b092d24 [file] [log] [blame]
Mark operator overload functions as const to avoid compiler errors
when building with libc++. This is already fixed in upstream OpenCV.
https://crbug.com/747060
diff -Nuar OpenCV-2.3.0/modules/flann/include/opencv2/flann/result_set.h opencv_new/modules/flann/include/opencv2/flann/result_set.h
--- OpenCV-2.3.0/modules/flann/include/opencv2/flann/result_set.h
+++ opencv_new/modules/flann/include/opencv2/flann/result_set.h
@@ -51,7 +51,7 @@
T node; /* Tree node at which search resumes */
float mindistsq; /* Minimum distance to query for all nodes below. */
- bool operator<(const BranchStruct<T>& rhs)
+ bool operator<(const BranchStruct<T>& rhs) const
{
return mindistsq<rhs.mindistsq;
}
@@ -208,7 +208,7 @@
int index;
float dist;
- bool operator<(Item rhs) {
+ bool operator<(Item rhs) const {
return dist<rhs.dist;
}
};