mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-18 11:47:06 +00:00
Use [[fallthrough]]; attribute instead of // fallthrough comment
This commit is contained in:
+5
-5
@@ -290,7 +290,7 @@ size_t act_StringLen(std::string const &str, bool printErrors) {
|
|||||||
errorInvalidUTF8Byte(byte, "STRLEN");
|
errorInvalidUTF8Byte(byte, "STRLEN");
|
||||||
}
|
}
|
||||||
decoder.state = UTF8_ACCEPT;
|
decoder.state = UTF8_ACCEPT;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case UTF8_ACCEPT:
|
case UTF8_ACCEPT:
|
||||||
++len;
|
++len;
|
||||||
break;
|
break;
|
||||||
@@ -325,7 +325,7 @@ std::string
|
|||||||
case UTF8_REJECT:
|
case UTF8_REJECT:
|
||||||
errorInvalidUTF8Byte(str[index], "STRSLICE");
|
errorInvalidUTF8Byte(str[index], "STRSLICE");
|
||||||
decoder.state = UTF8_ACCEPT;
|
decoder.state = UTF8_ACCEPT;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case UTF8_ACCEPT:
|
case UTF8_ACCEPT:
|
||||||
++curIdx;
|
++curIdx;
|
||||||
break;
|
break;
|
||||||
@@ -351,7 +351,7 @@ std::string
|
|||||||
case UTF8_REJECT:
|
case UTF8_REJECT:
|
||||||
errorInvalidUTF8Byte(str[index], "STRSLICE");
|
errorInvalidUTF8Byte(str[index], "STRSLICE");
|
||||||
decoder.state = UTF8_ACCEPT;
|
decoder.state = UTF8_ACCEPT;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case UTF8_ACCEPT:
|
case UTF8_ACCEPT:
|
||||||
++curIdx;
|
++curIdx;
|
||||||
break;
|
break;
|
||||||
@@ -394,7 +394,7 @@ std::string act_StringSub(std::string const &str, int32_t negPos, std::optional<
|
|||||||
case UTF8_REJECT:
|
case UTF8_REJECT:
|
||||||
errorInvalidUTF8Byte(str[index], "STRSUB");
|
errorInvalidUTF8Byte(str[index], "STRSUB");
|
||||||
decoder.state = UTF8_ACCEPT;
|
decoder.state = UTF8_ACCEPT;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case UTF8_ACCEPT:
|
case UTF8_ACCEPT:
|
||||||
++curPos;
|
++curPos;
|
||||||
break;
|
break;
|
||||||
@@ -419,7 +419,7 @@ std::string act_StringSub(std::string const &str, int32_t negPos, std::optional<
|
|||||||
case UTF8_REJECT:
|
case UTF8_REJECT:
|
||||||
errorInvalidUTF8Byte(str[index], "STRSUB");
|
errorInvalidUTF8Byte(str[index], "STRSUB");
|
||||||
decoder.state = UTF8_ACCEPT;
|
decoder.state = UTF8_ACCEPT;
|
||||||
// fallthrough
|
[[fallthrough]];
|
||||||
case UTF8_ACCEPT:
|
case UTF8_ACCEPT:
|
||||||
++curLen;
|
++curLen;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user