diff --git a/json11.cpp b/json11.cpp index 3d28c40..2dc955a 100644 --- a/json11.cpp +++ b/json11.cpp @@ -381,19 +381,19 @@ struct JsonParser { return; if (pt < 0x80) { - out += pt; + out += static_cast(pt); } else if (pt < 0x800) { - out += (pt >> 6) | 0xC0; - out += (pt & 0x3F) | 0x80; + out += static_cast((pt >> 6) | 0xC0); + out += static_cast((pt & 0x3F) | 0x80); } else if (pt < 0x10000) { - out += (pt >> 12) | 0xE0; - out += ((pt >> 6) & 0x3F) | 0x80; - out += (pt & 0x3F) | 0x80; + out += static_cast((pt >> 12) | 0xE0); + out += static_cast(((pt >> 6) & 0x3F) | 0x80); + out += static_cast((pt & 0x3F) | 0x80); } else { - out += (pt >> 18) | 0xF0; - out += ((pt >> 12) & 0x3F) | 0x80; - out += ((pt >> 6) & 0x3F) | 0x80; - out += (pt & 0x3F) | 0x80; + out += static_cast((pt >> 18) | 0xF0); + out += static_cast(((pt >> 12) & 0x3F) | 0x80); + out += static_cast(((pt >> 6) & 0x3F) | 0x80); + out += static_cast((pt & 0x3F) | 0x80); } }