diff --git a/src/parser3.h b/src/parser3.h index 5ed7c4b..973b85e 100644 --- a/src/parser3.h +++ b/src/parser3.h @@ -654,7 +654,7 @@ inline PRESERVE_NONE WeaselJsonStatus t_hex2(Parser3 *self) { } else if (self->utf8Codepoint < 0x800) { bool useTmp = self->buf - self->writeBuf < 2; char *p = tmp; - if (useTmp) { + if (useTmp) [[unlikely]] { self->flushString(false); } auto &w = useTmp ? p : self->writeBuf; @@ -662,7 +662,7 @@ inline PRESERVE_NONE WeaselJsonStatus t_hex2(Parser3 *self) { self->utf8Codepoint >>= 6; w[0] = (0b00011111 & self->utf8Codepoint) | 0b11000000; w += 2; - if (useTmp) { + if (useTmp) [[unlikely]] { self->callbacks->on_string_data(self->userdata, tmp, 2, false); } } else { @@ -680,7 +680,7 @@ inline PRESERVE_NONE WeaselJsonStatus t_hex2(Parser3 *self) { } bool useTmp = self->buf - self->writeBuf < 3; char *p = tmp; - if (useTmp) { + if (useTmp) [[unlikely]] { self->flushString(false); } auto &w = useTmp ? p : self->writeBuf; @@ -690,7 +690,7 @@ inline PRESERVE_NONE WeaselJsonStatus t_hex2(Parser3 *self) { self->utf8Codepoint >>= 6; w[0] = (0b00001111 & self->utf8Codepoint) | 0b11100000; w += 3; - if (useTmp) { + if (useTmp) [[unlikely]] { self->callbacks->on_string_data(self->userdata, tmp, 3, false); } } @@ -730,7 +730,7 @@ inline PRESERVE_NONE WeaselJsonStatus t_hex3(Parser3 *self) { } bool useTmp = self->buf - self->writeBuf < 4; char *p = tmp; - if (useTmp) { + if (useTmp) [[unlikely]] { self->flushString(false); } auto &w = useTmp ? p : self->writeBuf; @@ -742,7 +742,7 @@ inline PRESERVE_NONE WeaselJsonStatus t_hex3(Parser3 *self) { self->utf8Codepoint >>= 6; w[0] = (0b00000111 & self->utf8Codepoint) | 0b11110000; w += 4; - if (useTmp) { + if (useTmp) [[unlikely]] { self->callbacks->on_string_data(self->userdata, tmp, 4, false); }