diff --git a/src/parser/Parser.rl b/src/parser/Parser.rl index 668f3778..232b0218 100644 --- a/src/parser/Parser.rl +++ b/src/parser/Parser.rl @@ -237,8 +237,7 @@ unichar readUtf8CodePoint2c(const char *s) { static unichar readUtf8CodePoint3c(const char *s) { - // cppcheck-suppress cstyleCast - auto *ts = (const u8 *)s; + auto *ts = reinterpret_cast(s); assert(ts[0] >= 0xe0 && ts[0] < 0xf0); assert(ts[1] >= 0x80 && ts[1] < 0xc0); assert(ts[2] >= 0x80 && ts[2] < 0xc0); @@ -254,8 +253,7 @@ unichar readUtf8CodePoint3c(const char *s) { static unichar readUtf8CodePoint4c(const char *s) { - // cppcheck-suppress cstyleCast - auto *ts = (const u8 *)s; + auto *ts = reinterpret_cast(s); assert(ts[0] >= 0xf0 && ts[0] < 0xf8); assert(ts[1] >= 0x80 && ts[1] < 0xc0); assert(ts[2] >= 0x80 && ts[2] < 0xc0);