Skip to content

Commit 72c9425

Browse files
ldionnellvmbot
authored andcommitted
[libc++][NFC] Rewrite function call on two lines for clarity (#79141)
Previously, there was a ternary conditional with a less-than comparison appearing inside a template argument, which was really confusing because of the <...> of the function template. This patch rewrites the same statement on two lines for clarity. (cherry picked from commit 382f70a)
1 parent 443e23e commit 72c9425

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/include/string

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,8 +1943,8 @@ private:
19431943
if (__s < __min_cap) {
19441944
return static_cast<size_type>(__min_cap) - 1;
19451945
}
1946-
size_type __guess =
1947-
__align_it < sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1 > (__s + 1) - 1;
1946+
const size_type __boundary = sizeof(value_type) < __alignment ? __alignment / sizeof(value_type) : 1;
1947+
size_type __guess = __align_it<__boundary>(__s + 1) - 1;
19481948
if (__guess == __min_cap)
19491949
++__guess;
19501950
return __guess;

0 commit comments

Comments
 (0)