Commit Graph

16 Commits

Author SHA1 Message Date
Jonathan G Rennison
6be4708131 cpp-btreee: Fix alloc/dealloc size mismatch (struct padding)
Between new_leaf_node and delete_leaf_node
This is mostly harmless, but triggers AddressSanitizer

When alignof(value_type) is less than alignof(base_fields)
and kNodeValues * sizeof(value_type) is not an integral multiple
of alignof(base_fields), such that leaf_fields has padding
2023-09-12 23:25:14 +01:00
Jonathan G Rennison
b68491f2fe Btree: Add copy operator for safe iterators 2023-08-03 20:53:33 +01:00
Jonathan G Rennison
f00e0e195f cpp-btree: Add support for uncopyable/move-only map/multimap value types 2023-05-27 00:47:27 +01:00
Jonathan G Rennison
29a1e49c28 Change various asserts to not be included in release builds 2022-10-22 12:34:54 +01:00
Jonathan G Rennison
34f8098689 Suppress Wdeprecated-copy warning on clang/emscripten 2021-11-11 02:16:27 +00:00
Jonathan G Rennison
c4e3c2cd75 Avoid unknown pragma GCC diagnostic warning on GCC < 9 2021-11-11 00:54:57 +00:00
Jonathan G Rennison
a731da3956 Suppress Wdeprecated-copy warning in btree_iterator 2021-11-09 01:49:48 +00:00
Jonathan G Rennison
5586d1a20a Remove use of deprecated allocator rebind in cpp-btree 2021-10-29 21:12:16 +01:00
TechGeekNZ
cf8ea74733 Update: Merge branch 'jgrpp_master_cmake' into jgrpp_cmake 2020-06-28 21:56:43 +01:00
Jonathan G Rennison
e81697c363 cpp-btree: Fix -Wdeprecated-copy warnings on GCC 9 2019-11-05 18:07:49 +00:00
Jonathan G Rennison
9176d9a284 cpp-btree: Update to match upstream
Add noexcept to swap-based move constructors and copy/move assignment operator
2019-09-29 12:03:12 +01:00
Jonathan G Rennison
7690fe8572 cpp-btree: Update to match upstream
minor optimization: minimize calls to end()

Minor optimization: increase the chances that the compiler will inline calls to end().
Has been observed to make a difference with gcc 4.9.3.

Fix build and warnings on MSVC (2017)
Uses static_assert, a C++11 feature. Also adds some explicit uses of
static_cast in order to suppress warnings about lossy type conversion.
2018-11-01 18:54:24 +00:00
Jonathan G Rennison
133ccabf42 btree: Use static_assert instead of workaround macro 2018-05-06 12:15:54 +01:00
Jonathan G Rennison
344f39196f cpp-btree: Remove remaining uses of ssize_t
This is due to issues building on Windows
2017-02-28 21:23:52 +00:00
Jonathan G Rennison
418e9f4158 Remove assert.h include from btree.h, as this overrides OpenTTD's assert 2017-02-19 13:55:31 +00:00
Jonathan G Rennison
b4cfb1adbc Import cpp-btree library into 3rdparty section.
Repo: https://github.com/JGRennison/cpp-btree
Commmit: 6cabdb40fcbb7e12e6d499f92b898f6ec80ae0f1

Remove test program, build scripts, etc.
2017-02-07 19:07:11 +00:00