From af39f77461ec8d6af752f46650cdb08e36232e40 Mon Sep 17 00:00:00 2001 From: gtsoul-tech Date: Wed, 22 May 2024 11:11:13 +0300 Subject: [PATCH] cstylecast parser --- src/parser/Parser.rl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);