From 1b60c3d62deef02788d31c7d60ea1ab12323c150 Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sun, 21 Jun 2015 12:47:13 +0200 Subject: Avoid conversion warnings in rtl::get[High|Low]Surrogate Change-Id: I5eec1f7505e27eedd39081669011f7af42b8a26f Signed-off-by: Stephan Bergmann --- include/rtl/character.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/rtl/character.hxx') 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(((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(((code - 0x10000) & 0x3FF) | detail::surrogatesLowFirst); } /** Combine surrogates to form a code point. -- cgit