- 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:
Asger Ottar Alstrup 2006-10-22 13:51:37 +00:00
parent 6bcdafcd9c
commit 5c85bf0c64
2 changed files with 2 additions and 1 deletions

View File

@ -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) {

View File

@ -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.