Skip to content

Commit d17d89f

Browse files
nilayvaishldionne
authored andcommitted
[libc++] Remove not needed call to __is_long()
The string is known to be long since __grow_by unconditionally calls __set_long_cap(). Differential Revision: https://reviews.llvm.org/D113910
1 parent 4607459 commit d17d89f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/string

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c)
26582658
if (__sz == __cap)
26592659
{
26602660
__grow_by(__cap, 1, __sz, __sz, 0);
2661-
__is_short = !__is_long();
2661+
__is_short = false;
26622662
}
26632663
pointer __p;
26642664
if (__is_short)

0 commit comments

Comments
 (0)