Commit Graph

46 Commits

Author SHA1 Message Date
Max Kellermann dbaa72cb40 util/CircularBuffer: use std::span internally 2024-07-29 22:24:54 +02:00
Max Kellermann 9210705598 util/TerminatedArray: new class 2024-07-11 15:30:30 +02:00
Max Kellermann 7b938b4d14 util/Exception: sanitize message strings
This should prevent leaking unsanitized strings from libraries.
2024-06-25 20:29:07 +02:00
Max Kellermann c8ed28e9c6 test/util/TestIntrusiveList: add test for clear_and_dispose() with modifying disposer 2024-05-06 12:49:04 +02:00
Max Kellermann 3cf0896998 test/util/TestIntrusiveTreeSet: add test with large randomized tree, erasing random elements
Test fails currently due to two bugs in the red-black tree
implementation.
2024-04-10 13:35:24 +02:00
Max Kellermann e0a53d4747 util/IntrusiveTreeSet: add debug method Check()
Only for the unit test.
2024-04-10 13:35:21 +02:00
Max Kellermann 99da022775 util/IntrusiveSortedList: remove unused class 2024-04-03 21:31:08 +02:00
Max Kellermann 5a0bad3b2f util/IntrusiveTreeSet: new class 2024-04-03 21:29:34 +02:00
Max Kellermann 6a99f20828 util/IntrusiveHashSet: add concept checks to *Operators
This requires adding another template argument and reordering the others.
2024-04-03 21:27:37 +02:00
Max Kellermann 14dea04ee9 test/util: use unsigned integer literals for -Wsign-compare 2024-01-13 22:33:23 +01:00
Max Kellermann 10940da381 util/Intrusive{List,HashSet}: add "tag" for base hooks 2023-11-02 10:48:46 +01:00
Max Kellermann 5ddddbb16f test/util/TestIntrusiveForwardList: add push_back() test 2023-10-04 16:50:38 +02:00
Max Kellermann 64e91d6eb7 test/util/TestIntrusiveForwardList: add constant_time_size test 2023-09-16 22:39:03 +02:00
Max Kellermann f448bfd3f3 util/IntrusiveForwardList: add option `cache_last` 2023-09-16 22:39:03 +02:00
Max Kellermann 78801f303e test/util/TestIntrusiveHashSet: add test for remove_and_dispose_key() 2023-08-03 20:44:52 +02:00
Max Kellermann 2cd5f4cd3e util/IntrusiveHashSet: replace template parameters Hash/Equal with a single one
Preparing to add a key extraction function.  Without this "Operators"
template parameter, we'd have even more template parameters, and that
parameter list would grow too complex.  Better wrap it in one single
template that contains all operators.

This is an API change which all callers need to adjust to, but it will
be worth it.
2023-08-03 20:44:14 +02:00
Max Kellermann 42d5b05f54 util/IntrusiveHashSet: rename insert() to insert_commit()
Clarify that the method is not a freestanding insertion method but
should only be used after insert_check().
2023-07-21 19:42:26 +02:00
Max Kellermann 42f6a0441c use [[gnu::...]] attributes 2023-03-06 16:14:15 +01:00
Max Kellermann 148aca23be use SPDX IDs, replacing the long copyright headers 2023-03-06 14:59:48 +01:00
Max Kellermann c6eac285ea test/util/TestRingBuffer: add "U" literal suffix to work around -Wsign-compare 2023-01-23 14:05:55 +01:00
Max Kellermann f31ae7c556 util/RingBuffer: replacement for boost::lockfree::spsc_queue 2023-01-23 13:44:54 +01:00
Max Kellermann 8860962e09 util/IntrusiveHashSet: make several methods `const` 2022-12-01 15:10:13 +01:00
Max Kellermann 51769c40d8 util/IntrusiveSortedList: new class 2022-11-13 09:08:36 +01:00
Max Kellermann c943e27d51 util/IntrusiveHashSet: new class
Incomplete draft implementation, just enough methods for current
needs.
2022-11-13 08:38:53 +01:00
Max Kellermann fb5d77158a util/IntrusiveList: add enum LinkMode
Compile-time code simplification.
2022-11-13 08:15:47 +01:00
Max Kellermann 963ff846ff test/util/TestIntrusiveForwardList: new unit test 2022-11-11 21:13:41 +01:00
Max Kellermann 48c4081ba1 test/util/TestIntrusiveList: remove unused code 2022-11-11 21:11:22 +01:00
Max Kellermann a448d04d46 util/SortList: library which sorts linked lists 2022-11-11 19:03:39 +01:00
Max Kellermann 1ccfd1fb67 test/util/TestIntrusiveList: simplify tests 2022-11-11 16:41:24 +01:00
Max Kellermann 84fd401d21 util/IntrusiveList: add method splice() 2022-11-11 10:05:20 +01:00
Max Kellermann b78d6c9dd7 test/util/TestIntrusiveList: add tests for reverse iterators 2022-11-11 09:53:00 +01:00
Max Kellermann cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann 6d23ac67f9 util/UriQueryParser: use std::string_view 2022-07-01 11:29:10 +02:00
Max Kellermann b806b0a97f util/StringStrip: add std::string_view overloads 2022-06-30 21:00:07 +02:00
Max Kellermann bc3415ce8b Copyright year 2022 2022-06-30 09:41:53 +02:00
Max Kellermann b50173ae8b util/CircularBuffer: use std::span 2022-05-20 11:15:45 +02:00
Max Kellermann cc421b04cd test/meson.build: add "protocol:gtest" where appropriate 2021-11-26 08:47:06 +01:00
Max Kellermann 41a69027c2 test/util/TestUriRelative: add failing test for "./" prefix 2021-10-07 14:44:30 +02:00
Max Kellermann 99217593bf test/util/TestIntrusiveList: add AutoUnlink test 2021-03-02 18:15:37 +01:00
Max Kellermann 1c6e4a2b18 test/util/TestIntrusiveList: new unit test 2021-03-02 18:12:15 +01:00
Max Kellermann 0091c4e12b util/Exception: add FindNested() 2021-03-02 17:13:29 +01:00
Max Kellermann 2d96b05403 test/util/TestException: add CheckFindRetrowNested() unit test 2021-03-02 17:12:43 +01:00
Max Kellermann abbd980671 Merge branch 'v0.22.x' 2021-01-01 19:59:15 +01:00
Max Kellermann ce4c69dd95 test/util/TestException: new unit test 2020-12-02 15:09:47 +01:00
Max Kellermann 8eea825462 test/util/TestTemplateString: new unit test 2020-12-02 15:03:51 +01:00
Max Kellermann 49e1ce7c43 test/TestUtil: move to test/util/ 2020-12-02 15:02:45 +01:00