mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
- 5% speed-up by reserving space in the vector we build for drawing
- Simplify isPrintableNonspace git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15475 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6bcdafcd9c
commit
5c85bf0c64
@ -267,6 +267,7 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont font,
|
||||
str += par_.getChar(pos);
|
||||
#else
|
||||
std::vector<char_type> str;
|
||||
str.reserve(100);
|
||||
str.push_back(par_.getChar(pos));
|
||||
#endif
|
||||
if (arabic) {
|
||||
|
@ -50,7 +50,7 @@ bool isPrintable(lyx::char_type c)
|
||||
inline
|
||||
bool isPrintableNonspace(lyx::char_type c)
|
||||
{
|
||||
return isPrintable(c) && c != ' ';
|
||||
return (c & 127) > ' ';
|
||||
}
|
||||
|
||||
/// return true if a unicode char is a digit.
|
||||
|
Loading…
Reference in New Issue
Block a user