Make VMap::find_nearest return -1 when empty
(cherry picked from commit 3057b19daa)
This commit is contained in:
committed by
Rémi Verschelde
parent
9135074cc2
commit
0f76143444
@ -141,6 +141,9 @@ public:
|
||||
}
|
||||
|
||||
int find_nearest(const T &p_val) const {
|
||||
if (_cowdata.empty()) {
|
||||
return -1;
|
||||
}
|
||||
bool exact;
|
||||
return _find(p_val, exact);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user