mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Use scoped blocks for case-specific variables
This commit is contained in:
@@ -92,9 +92,8 @@ void opt_Parse(char const *s) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
char const *precisionArg;
|
case 'Q': {
|
||||||
case 'Q':
|
char const *precisionArg = &s[1];
|
||||||
precisionArg = &s[1];
|
|
||||||
if (precisionArg[0] == '.') {
|
if (precisionArg[0] == '.') {
|
||||||
++precisionArg;
|
++precisionArg;
|
||||||
}
|
}
|
||||||
@@ -114,6 +113,7 @@ void opt_Parse(char const *s) {
|
|||||||
error("Invalid argument for option 'Q'");
|
error("Invalid argument for option 'Q'");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case 'r': {
|
case 'r': {
|
||||||
++s; // Skip 'r'
|
++s; // Skip 'r'
|
||||||
|
|||||||
@@ -120,8 +120,8 @@ static void readFileStackNode(
|
|||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NODE_REPT: {
|
||||||
uint32_t depth;
|
uint32_t depth;
|
||||||
case NODE_REPT:
|
|
||||||
tryReadLong(
|
tryReadLong(
|
||||||
depth, file, "%s: Cannot read node #%" PRIu32 "'s REPT depth: %s", fileName, nodeID
|
depth, file, "%s: Cannot read node #%" PRIu32 "'s REPT depth: %s", fileName, nodeID
|
||||||
);
|
);
|
||||||
@@ -144,6 +144,7 @@ static void readFileStackNode(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads a symbol from a file.
|
// Reads a symbol from a file.
|
||||||
|
|||||||
Reference in New Issue
Block a user