mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
another 8% or so when loading the UserGuide...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4271 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b6b0e583fd
commit
6ef49d59c2
@ -1141,8 +1141,7 @@ int Paragraph::beginningOfMainBody() const
|
||||
// and remember the previous character to
|
||||
// remove unnecessary GetChar() calls
|
||||
pos_type i = 0;
|
||||
if (i < size()
|
||||
&& getChar(i) != Paragraph::META_NEWLINE) {
|
||||
if (i < size() && getChar(i) != Paragraph::META_NEWLINE) {
|
||||
++i;
|
||||
char previous_char = 0;
|
||||
char temp = 0;
|
||||
|
@ -89,13 +89,16 @@ void Paragraph::Pimpl::setContentsFromPar(Paragraph const * par)
|
||||
|
||||
Paragraph::value_type Paragraph::Pimpl::getChar(pos_type pos) const
|
||||
{
|
||||
lyx::Assert(pos <= size());
|
||||
// This is in the critical path for loading!
|
||||
pos_type siz = size();
|
||||
lyx::Assert(pos <= siz);
|
||||
// This is stronger, and I belive that this is the assertion
|
||||
// that we should really use. (Lgb)
|
||||
//Assert(pos < size());
|
||||
|
||||
// Then this has no meaning. (Lgb)
|
||||
if (!size() || pos == size()) return '\0';
|
||||
if (!siz || pos == siz)
|
||||
return '\0';
|
||||
|
||||
return text[pos];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user