mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Misc performance tweaks.
This commit is contained in:
parent
1356ae6387
commit
2fccfccbc0
5 changed files with 9 additions and 8 deletions
|
|
@ -172,7 +172,7 @@ struct CoreAudioFormatMetatdata
|
|||
}
|
||||
|
||||
if (tempoSequence.getDataSize() > 0)
|
||||
midiMetadata.set ("tempo sequence", tempoSequence.toString());
|
||||
midiMetadata.set ("tempo sequence", tempoSequence.toUTF8());
|
||||
}
|
||||
|
||||
static double getTempoFromTempoMetaEvent (MidiMessageSequence::MidiEventHolder* holder)
|
||||
|
|
@ -217,7 +217,7 @@ struct CoreAudioFormatMetatdata
|
|||
}
|
||||
|
||||
if (timeSigSequence.getDataSize() > 0)
|
||||
midiMetadata.set ("time signature sequence", timeSigSequence.toString());
|
||||
midiMetadata.set ("time signature sequence", timeSigSequence.toUTF8());
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ private:
|
|||
buffer.appendUTF8Char (c);
|
||||
}
|
||||
|
||||
result = buffer.toString();
|
||||
result = buffer.toUTF8();
|
||||
return Result::ok();
|
||||
}
|
||||
};
|
||||
|
|
@ -526,7 +526,7 @@ String JSON::toString (const var& data, const bool allOnOneLine)
|
|||
{
|
||||
MemoryOutputStream mo (1024);
|
||||
JSONFormatter::write (mo, data, 0, allOnOneLine);
|
||||
return mo.toString();
|
||||
return mo.toUTF8();
|
||||
}
|
||||
|
||||
void JSON::writeToStream (OutputStream& output, const var& data, const bool allOnOneLine)
|
||||
|
|
|
|||
|
|
@ -175,7 +175,8 @@ String InputStream::readString()
|
|||
}
|
||||
}
|
||||
|
||||
return String::fromUTF8 (data, (int) i);
|
||||
return String (CharPointer_UTF8 (data),
|
||||
CharPointer_UTF8 (data + i));
|
||||
}
|
||||
|
||||
String InputStream::readNextLine()
|
||||
|
|
|
|||
|
|
@ -2385,7 +2385,7 @@ String TextEditor::getText() const
|
|||
for (int i = 0; i < sections.size(); ++i)
|
||||
sections.getUnchecked (i)->appendAllText (mo);
|
||||
|
||||
return mo.toString();
|
||||
return mo.toUTF8();
|
||||
}
|
||||
|
||||
String TextEditor::getTextInRange (const Range<int>& range) const
|
||||
|
|
@ -2414,7 +2414,7 @@ String TextEditor::getTextInRange (const Range<int>& range) const
|
|||
index = nextIndex;
|
||||
}
|
||||
|
||||
return mo.toString();
|
||||
return mo.toUTF8();
|
||||
}
|
||||
|
||||
String TextEditor::getHighlightedText() const
|
||||
|
|
|
|||
|
|
@ -522,7 +522,7 @@ String CodeDocument::getTextBetween (const Position& start, const Position& end)
|
|||
}
|
||||
}
|
||||
|
||||
return mo.toString();
|
||||
return mo.toUTF8();
|
||||
}
|
||||
|
||||
int CodeDocument::getNumCharacters() const noexcept
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue