[libcxx-commits] [libcxx] [libc++] Remove a bunch of now unnecessary indirections in __tree (PR #142397)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 2 07:05:16 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions -- libcxx/include/__tree libcxx/include/map
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 29c68cacd..1c2dcb4e0 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -1224,11 +1224,9 @@ public:
_LIBCPP_HIDE_FROM_ABI void __copy_assign_alloc(const __tree&, false_type) {}
private:
- _LIBCPP_HIDE_FROM_ABI __node_base_pointer&
- __find_leaf_low(__parent_pointer& __parent, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_low(__parent_pointer& __parent, const value_type& __v);
- _LIBCPP_HIDE_FROM_ABI __node_base_pointer&
- __find_leaf_high(__parent_pointer& __parent, const value_type& __v);
+ _LIBCPP_HIDE_FROM_ABI __node_base_pointer& __find_leaf_high(__parent_pointer& __parent, const value_type& __v);
_LIBCPP_HIDE_FROM_ABI __node_base_pointer&
__find_leaf(const_iterator __hint, __parent_pointer& __parent, const value_type& __v);
@@ -1569,8 +1567,8 @@ void __tree<_Tp, _Compare, _Allocator>::clear() _NOEXCEPT {
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
-typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& __tree<_Tp, _Compare, _Allocator>::__find_leaf_low(
- __parent_pointer& __parent, const value_type& __v) {
+typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
+__tree<_Tp, _Compare, _Allocator>::__find_leaf_low(__parent_pointer& __parent, const value_type& __v) {
__node_pointer __nd = __root();
if (__nd != nullptr) {
while (true) {
@@ -1599,8 +1597,8 @@ typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& __tree<_Tp, _Co
// Set __parent to parent of null leaf
// Return reference to null leaf
template <class _Tp, class _Compare, class _Allocator>
-typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer& __tree<_Tp, _Compare, _Allocator>::__find_leaf_high(
- __parent_pointer& __parent, const value_type& __v) {
+typename __tree<_Tp, _Compare, _Allocator>::__node_base_pointer&
+__tree<_Tp, _Compare, _Allocator>::__find_leaf_high(__parent_pointer& __parent, const value_type& __v) {
__node_pointer __nd = __root();
if (__nd != nullptr) {
while (true) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/142397
More information about the libcxx-commits
mailing list