Replaced macros with C++17 attributes.

This commit is contained in:
Бранимир Караџић
2023-12-02 20:16:56 -08:00
parent 837803454a
commit e9e2e224ee
9 changed files with 90 additions and 90 deletions

View File

@@ -72,11 +72,11 @@ static char* cpToUTF8(int cp, char* str)
switch (n)
{
case 6: str[5] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x4000000; BX_FALLTHROUGH;
case 5: str[4] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x200000; BX_FALLTHROUGH;
case 4: str[3] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x10000; BX_FALLTHROUGH;
case 3: str[2] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x800; BX_FALLTHROUGH;
case 2: str[1] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0xc0; BX_FALLTHROUGH;
case 6: str[5] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x4000000; [[fallthrough]];
case 5: str[4] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x200000; [[fallthrough]];
case 4: str[3] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x10000; [[fallthrough]];
case 3: str[2] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0x800; [[fallthrough]];
case 2: str[1] = 0x80 | (cp & 0x3f); cp = cp >> 6; cp |= 0xc0; [[fallthrough]];
case 1: str[0] = char(cp); break;
}