mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
Couple of optimisations to text rendering. Removed various printfs from the codebase.
This commit is contained in:
parent
858a758aee
commit
d84e47353c
22 changed files with 142 additions and 217 deletions
|
|
@ -151,7 +151,13 @@ juce_wchar CodeDocument::Iterator::nextChar()
|
|||
|
||||
jassert (currentLine == document->lines.getUnchecked (line));
|
||||
const juce_wchar result = currentLine->line [position - currentLine->lineStartInFile];
|
||||
skip();
|
||||
|
||||
if (++position >= currentLine->lineStartInFile + currentLine->lineLength)
|
||||
{
|
||||
++line;
|
||||
currentLine = document->lines [line];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -191,7 +197,7 @@ juce_wchar CodeDocument::Iterator::peekNextChar() const
|
|||
return 0;
|
||||
|
||||
jassert (currentLine == document->lines.getUnchecked (line));
|
||||
return currentLine->line [position - currentLine->lineStartInFile];
|
||||
return const_cast <const String&> (currentLine->line) [position - currentLine->lineStartInFile];
|
||||
}
|
||||
|
||||
void CodeDocument::Iterator::skipWhitespace()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue