diff --git a/include/wx/unichar.h b/include/wx/unichar.h index bbd75466bf..5d731754b1 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -93,14 +93,14 @@ public: static wxUint16 HighSurrogate(wxUint32 value) { wxASSERT_MSG(IsSupplementary(value), "wxUniChar::HighSurrogate() must be called on a supplementary character"); - return 0xD800 | ((value - 0x10000) >> 10); + return static_cast(0xD800 | ((value - 0x10000) >> 10)); } // Returns the low surrogate code unit for the supplementary character static wxUint16 LowSurrogate(wxUint32 value) { wxASSERT_MSG(IsSupplementary(value), "wxUniChar::LowSurrogate() must be called on a supplementary character"); - return 0xDC00 | ((value - 0x10000) & 0x03FF); + return static_cast(0xDC00 | ((value - 0x10000) & 0x03FF)); } // Returns true if the character is a BMP character: