Skip to content

Conversation

@philnik777
Copy link
Contributor

This patch introduces a few wrapper functions around __grow_by to make
it clearer what the intention of the different calls is. Later these can
probably be implemented in a simpler manner than __grow_by.

This patch introduces a few wrapper functions around `__grow_by` to make
it clearer what the intention of the different calls is. Later these can
probably be implemented in a simpler manner than `__grow_by`.
@github-actions
Copy link

github-actions bot commented Feb 6, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 4562efc674a5b5e052abdfc40047e82a359d0df0 05b23a9df84031c287dbad0952b8a1f39a425b41 --extensions  -- libcxx/include/string
View the diff from clang-format here.
diff --git a/libcxx/include/string b/libcxx/include/string
index 829723ebd5..1dc039821c 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -2605,7 +2605,7 @@ void _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI basic_string<_CharT, _T
   auto __guard = std::__make_scope_guard(__annotate_new_size(*this));
 
   auto __old_cap = capacity();
-  auto __old_sz =  size();
+  auto __old_sz  = size();
   _LIBCPP_SUPPRESS_DEPRECATED_PUSH
   __grow_by(__old_cap, __new_cap - __old_cap, __old_sz, __n_copy, __n_del, __n_add);
   _LIBCPP_SUPPRESS_DEPRECATED_POP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant