mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Simplify readString
This commit is contained in:
@@ -1546,17 +1546,16 @@ static void readString(std::string &str, bool rawString) {
|
|||||||
if (rawMode) {
|
if (rawMode) {
|
||||||
str += '"';
|
str += '"';
|
||||||
}
|
}
|
||||||
if (peek() == '"') {
|
if (peek() != '"') {
|
||||||
|
// "" is an empty string, skip the loop
|
||||||
|
return;
|
||||||
|
}
|
||||||
// """ begins a multi-line string
|
// """ begins a multi-line string
|
||||||
shiftChar();
|
shiftChar();
|
||||||
if (rawMode) {
|
if (rawMode) {
|
||||||
str += '"';
|
str += '"';
|
||||||
}
|
}
|
||||||
multiline = true;
|
multiline = true;
|
||||||
} else {
|
|
||||||
// "" is an empty string, skip the loop
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|||||||
Reference in New Issue
Block a user