After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 781641 - Add additional query functions to Traversable<G>
Add additional query functions to Traversable<G>
Product: libgee
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: libgee-maint
Depends on:
Reported: 2017-04-23 18:52 UTC by Edward Hennessy
Modified: 2017-12-11 13:03 UTC
See Also:
GNOME target: ---
GNOME version: ---

Patch with additional Traversable<G> funcions (3.88 KB, patch)
2017-04-23 18:52 UTC, Edward Hennessy
committed Details | Review

Description Edward Hennessy 2017-04-23 18:52:07 UTC
Created attachment 350270 [details] [review]
Patch with additional Traversable<G> funcions

Added function to test if only a single element matches a predicate. This function can be faster than counting, since the loop can be abandon if more than one matching element is found.

Added function to count elements matching a predicate. Named the function count_match, so if a family of functions are created in the future, they can follow the count_xxx template.