Chromium Code Reviews
DescriptionCleanup TextDirection
This patch:
1. Changes kLtr to be 0. In most CPU architectures, 0 is faster and
smaller code to set to and to compare with.
This also matches to the assignments in ICU UBiDiDirection[1].
2. Adds comments.
3. Removes type name from function name since it's not needed when it
was changed to "enum class", and looks redundant.
4. Prefers LTR/RTL than full spell, since they are common enough
acronyms used in many specs and is more intuitive than full spell.
Note the style guide[2] prefers to capitalize acronyms.
5. Adds "IsRtl()" for better readability than "!IsLtr()".
[1] https://cs.chromium.org/chromium/src/third_party/icu/source/common/unicode/ubidi.h?type=cs&q=UBiDiDirection&l=419
[2] https://google.github.io/styleguide/cppguide.html#Function_Names
Review-Url: https://codereview.chromium.org/2925293003
Cr-Commit-Position: refs/heads/master@{#478707}
Committed: https://chromium.googlesource.com/chromium/src/+/3b243ddca222fb1533dd1dcc29a6dfc07986d756
Patch Set 1 #Patch Set 2 : Fix typo in comments #Patch Set 3 : unsigned to uint8_t #
Messages
Total messages: 21 (15 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||