Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
33b546b9
Commit
33b546b9
authored
Nov 17, 2021
by
Tomaz Canabrava
Browse files
speed up `canBeGrouped`
Move the quick test before the expensive test.
parent
f7c07135
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/characters/Character.h
View file @
33b546b9
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment