1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-30 02:50:05 +00:00

Modernised a bunch of code mainly relating to character/string iteration

This commit is contained in:
jules 2017-10-19 16:50:02 +01:00
parent d346d6ef50
commit f0ef700e46
27 changed files with 356 additions and 379 deletions

View file

@ -159,12 +159,12 @@ namespace CodeHelpers
StringArray lines;
{
String::CharPointerType t (text.getCharPointer());
auto t = text.getCharPointer();
bool finished = t.isEmpty();
while (! finished)
{
for (String::CharPointerType startOfLine (t);;)
for (auto startOfLine = t;;)
{
switch (t.getAndAdvance())
{
@ -437,7 +437,7 @@ namespace CodeHelpers
String getLeadingWhitespace (String line)
{
line = line.removeCharacters ("\r\n");
const String::CharPointerType endOfLeadingWS (line.getCharPointer().findEndOfWhitespace());
auto endOfLeadingWS = line.getCharPointer().findEndOfWhitespace();
return String (line.getCharPointer(), endOfLeadingWS);
}