mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Replaced macros with C++17 attributes.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user