mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
Refactored various string processing in the library. Removed a couple of String accessors that relied on assumptions about the format of the string's internal data (if your code has any problems with these changes, you should probably use the String::getCharPointer() method instead).
This commit is contained in:
parent
c10c810aee
commit
3bacbe2a8c
37 changed files with 780 additions and 893 deletions
|
|
@ -140,13 +140,13 @@ bool TextLayout::isEmpty() const
|
|||
|
||||
void TextLayout::appendText (const String& text, const Font& font)
|
||||
{
|
||||
const juce_wchar* t = text;
|
||||
String::CharPointerType t (text.getCharPointer());
|
||||
String currentString;
|
||||
int lastCharType = 0;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
const juce_wchar c = *t++;
|
||||
const juce_wchar c = t.getAndAdvance();
|
||||
if (c == 0)
|
||||
break;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ void TextLayout::appendText (const String& text, const Font& font)
|
|||
currentString = String::charToString (c);
|
||||
|
||||
if (c == '\r' && *t == '\n')
|
||||
currentString += *t++;
|
||||
currentString += t.getAndAdvance();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue