[libcxx-commits] [PATCH] D120751: [libc++] Fix initialization of __fill_
Arthur O'Dwyer via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 2 06:55:52 PST 2022
Quuxplusone accepted this revision as: Quuxplusone.
Quuxplusone added a comment.
LGTM now! but let's wait for @ldionne to re-examine it.
================
Comment at: libcxx/include/ios:784-786
+ if (traits_type::eq_int_type(traits_type::eof(), __fill_))
+ __fill_ = widen(' ');
char_type __r = __fill_;
----------------
Ah, this looks vastly better!
At first I wondered whether these three lines should be replaced with
```
char_type __r = traits_type::eq_int_type(__fill_, traits_type::eof()) ? widen(' ') : __fill_;
```
so we're not overwriting `__fill_` twice; but I see that what you've done here is consistent with lines 774-775 above, so IMHO it's fine as-is.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120751/new/
https://reviews.llvm.org/D120751
More information about the libcxx-commits
mailing list