[Frontend] Use StringRef::drop_while (NFC)
This commit is contained in:
parent
7f69c8b3a6
commit
5c37e711df
@ -147,8 +147,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) {
|
|||||||
|
|
||||||
// Skip over this offset, the following comma, and any spaces.
|
// Skip over this offset, the following comma, and any spaces.
|
||||||
LineStr = LineStr.substr(1);
|
LineStr = LineStr.substr(1);
|
||||||
while (!LineStr.empty() && isWhitespace(LineStr[0]))
|
LineStr = LineStr.drop_while(isWhitespace);
|
||||||
LineStr = LineStr.substr(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,8 +162,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) {
|
|||||||
|
|
||||||
// Skip over this offset, the following comma, and any spaces.
|
// Skip over this offset, the following comma, and any spaces.
|
||||||
LineStr = LineStr.substr(1);
|
LineStr = LineStr.substr(1);
|
||||||
while (!LineStr.empty() && isWhitespace(LineStr[0]))
|
LineStr = LineStr.drop_while(isWhitespace);
|
||||||
LineStr = LineStr.substr(1);
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -180,8 +178,7 @@ LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) {
|
|||||||
|
|
||||||
// Skip over this offset, the following comma, and any spaces.
|
// Skip over this offset, the following comma, and any spaces.
|
||||||
LineStr = LineStr.substr(1);
|
LineStr = LineStr.substr(1);
|
||||||
while (!LineStr.empty() && isWhitespace(LineStr[0]))
|
LineStr = LineStr.drop_while(isWhitespace);
|
||||||
LineStr = LineStr.substr(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user