speed up `canBeGrouped`

Move the quick test before the expensive test.
wilder
Tomaz Canabrava 4 years ago
parent f7c07135ba
commit 33b546b98f
  1. 6
      src/characters/Character.h

@ -158,11 +158,15 @@ public:
inline bool canBeGrouped(bool bidirectionalEnabled, bool isDoubleWidth) const
{
if (character <= 0x7e) {
return true;
}
if (QChar::script(character) == QChar::Script_Braille) {
return false;
}
return character <= 0x7e || (rendition & RE_EXTENDED_CHAR) || (bidirectionalEnabled && !isDoubleWidth);
return (rendition & RE_EXTENDED_CHAR) || (bidirectionalEnabled && !isDoubleWidth);
}
inline uint baseCodePoint() const

Loading…
Cancel
Save