diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-06-21 12:47:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-23 12:33:36 +0200 |
commit | 1b60c3d62deef02788d31c7d60ea1ab12323c150 (patch) | |
tree | ae1d35e42ae02f84d057e792e28064a2f3a6799d /include/rtl | |
parent | cbe3b2fe0b9d745e22a2bf436ce55141b15f9502 (diff) |
Avoid conversion warnings in rtl::get[High|Low]Surrogate
Change-Id: I5eec1f7505e27eedd39081669011f7af42b8a26f
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/character.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rtl/character.hxx b/include/rtl/character.hxx index 52151e8c10ed..a3d09b9b0df7 100644 --- a/include/rtl/character.hxx +++ b/include/rtl/character.hxx @@ -261,7 +261,7 @@ inline bool isLowSurrogate(sal_uInt32 code) { inline sal_Unicode getHighSurrogate(sal_uInt32 code) { assert(code <= 0x10FFFF); assert(code >= 0x10000); - return ((code - 0x10000) >> 10) | detail::surrogatesHighFirst; + return static_cast<sal_Unicode>(((code - 0x10000) >> 10) | detail::surrogatesHighFirst); } /** Get low surrogate half of a non-BMP Unicode code point. @@ -275,7 +275,7 @@ inline sal_Unicode getHighSurrogate(sal_uInt32 code) { inline sal_Unicode getLowSurrogate(sal_uInt32 code) { assert(code <= 0x10FFFF); assert(code >= 0x10000); - return ((code - 0x10000) & 0x3FF) | detail::surrogatesLowFirst; + return static_cast<sal_Unicode>(((code - 0x10000) & 0x3FF) | detail::surrogatesLowFirst); } /** Combine surrogates to form a code point. |