Cleanup 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}
Showing
Please register or sign in to comment