@@ -409,7 +409,7 @@ class Gap :
409409 /* * Return pointer to the first element that fulfills the passed in condition and remove the entry
410410 * that was pointing to the item. Transfers ownership to caller.
411411 *
412- * @param compare_func The condition that is checked for all the items start from last put in .
412+ * @param compare_func The condition that is checked for all the items.
413413 * @return First element that fulfills the passed in condition or nullptr if no such item found.
414414 */
415415 EventType* pop (mbed::Callback<bool (EventType&)> compare_func)
@@ -425,9 +425,12 @@ class Gap :
425425 }
426426
427427 /* * Return pointer to the first element that fulfills the passed in condition and remove the entry
428- * that was pointing to the item. Transfers ownership to caller.
428+ * that was pointing to the item. Takes and returns number of failed matches allowing to speed up search.
429+ * Transfers ownership to caller.
430+ *
431+ * @note Calls must be consecutive - any call to pop or find will invalidate the search.
429432 *
430- * @param compare_func The condition that is checked for all the items start from last put in .
433+ * @param compare_func The condition that is checked for all the items.
431434 * @param events_not_matching Pointer to the number of items already searched but not matching.
432435 * This is updated in the method.
433436 * @return First element that fulfills the passed in condition or nullptr if no such item found.
@@ -448,7 +451,7 @@ class Gap :
448451
449452 /* * Return pointer to the first element that fulfills the passed in condition. Does not remove item from list.
450453 *
451- * @param compare_func The condition that is checked for all the items start from last put in .
454+ * @param compare_func The condition that is checked for all the items.
452455 * @return First element that fulfills the passed in condition or nullptr if no such item found.
453456 */
454457 EventType* find (mbed::Callback<bool (EventType&)> compare_func)
0 commit comments