[Libreoffice-commits] core.git: include/vcl
Caolán McNamara
caolanm at redhat.com
Thu Jun 21 11:23:26 UTC 2018
include/vcl/font/Feature.hxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 6b496d6a0f8b9de38fbf6721796104496d927db3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Jun 21 10:34:32 2018 +0100
ofz#9023 Undefined-shift
Change-Id: I167461e51bdc1fd68120a9d482ca7b08205a93f2
Reviewed-on: https://gerrit.libreoffice.org/56226
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/font/Feature.hxx b/include/vcl/font/Feature.hxx
index 0fa8f6d5bb70..0ab375e1a76c 100644
--- a/include/vcl/font/Feature.hxx
+++ b/include/vcl/font/Feature.hxx
@@ -23,7 +23,8 @@ namespace font
{
constexpr sal_uInt32 featureCode(const char sFeature[4])
{
- return sFeature[0] << 24 | sFeature[1] << 16 | sFeature[2] << 8 | sFeature[3] << 0;
+ return static_cast<sal_uInt32>(sFeature[0]) << 24U | static_cast<sal_uInt32>(sFeature[1]) << 16U
+ | static_cast<sal_uInt32>(sFeature[2]) << 8U | static_cast<sal_uInt32>(sFeature[3]);
}
VCL_DLLPUBLIC OUString featureCodeAsString(sal_uInt32 nFeature);
More information about the Libreoffice-commits
mailing list