diff options
author | Vitaly Buka <vitalybuka@google.com> | 2024-04-30 14:33:57 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2024-04-30 14:35:17 -0700 |
commit | f89e557365baebd5720ef954bb13aca3a72fa500 (patch) | |
tree | 22fb80469a3b792228fad86194a1fe15f0fb919e | |
parent | cc2f5193db42357befe51b6e0fd752ce20b71f3c (diff) |
@philnik777 proposalupstream/users/vitalybuka/spr/libcxx-avoid-__cxa_atexit-with-o0
-rw-r--r-- | libcxx/include/string | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/string b/libcxx/include/string index c72241ff00ac..aac2b737127e 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -1960,10 +1960,10 @@ private: if (__s < __min_cap) { return static_cast<size_type>(__min_cap) - 1; } - const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1; + const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : __endian_factor; size_type __guess = __align_it<__boundary>(__s + 1) - 1; if (__guess == __min_cap) - ++__guess; + __guess += 2; return __guess; } |