We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b7c04b commit 4f75aa4Copy full SHA for 4f75aa4
library/include/MiscUtils.h
@@ -328,8 +328,8 @@ bool linked_list_remove(L *list, F matches) {
328
auto matches_wrapper = [&](L::iterator::value_type item) {
329
return item && matches(item);
330
};
331
- auto it = std::find_if(list->begin(), list->end(), matches_wrapper);
332
- if (it == list->end())
+ typename L::const_iterator it = std::find_if(list->cbegin(), list->cend(), matches_wrapper);
+ if (it == list->cend())
333
return false;
334
auto item = *it;
335
list->erase(it);
0 commit comments