Prefer empty braces to semicolons for empty loop bodies

This commit is contained in:
Rangi42
2025-01-17 00:20:33 -05:00
parent a85d6b3b57
commit fac5e35d24
3 changed files with 5 additions and 10 deletions

View File

@@ -250,8 +250,7 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
// `expression` is not guaranteed to be '\0'-terminated. If it is not,
// `getRPNByte` will have a fatal internal error.
char const *name = reinterpret_cast<char const *>(expression);
while (getRPNByte(expression, size, patch))
;
while (getRPNByte(expression, size, patch)) {}
if (Section const *sect = sect_GetSection(name); !sect) {
error(
@@ -281,8 +280,7 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
case RPN_SIZEOF_SECT: {
// This has assumptions commented in the `RPN_BANK_SECT` case above.
char const *name = reinterpret_cast<char const *>(expression);
while (getRPNByte(expression, size, patch))
;
while (getRPNByte(expression, size, patch)) {}
if (Section const *sect = sect_GetSection(name); !sect) {
error(
@@ -302,8 +300,7 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
case RPN_STARTOF_SECT: {
// This has assumptions commented in the `RPN_BANK_SECT` case above.
char const *name = reinterpret_cast<char const *>(expression);
while (getRPNByte(expression, size, patch))
;
while (getRPNByte(expression, size, patch)) {}
if (Section const *sect = sect_GetSection(name); !sect) {
error(