vcl/source/font/OpenTypeFeatureDefinitionList.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 85d15cfaf9b0665d907e099d6588dea0ced556ff Author: Stephan Bergmann <[email protected]> AuthorDate: Thu May 19 10:35:30 2022 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu May 19 14:20:59 2022 +0200 No need to cast to char here ...when comparing some unsigned values against ordinary character literals encoding characters from the basic execution character set (which are guaranteed to have non-negative values regardless of the signed-ness of plain char, cf. C++17 [lex.charset]/3 "For each basic execution character set, the values of the members shall be non-negative") Change-Id: I2928ad81406d117e7660f2b6f122051341c3954f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134605 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx index 185668ba7f2f..bd60c0e3bd32 100644 --- a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx +++ b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx @@ -132,14 +132,14 @@ namespace { bool isCharacterVariantCode(sal_uInt32 nFeatureCode) { - return char((sal_uInt32(nFeatureCode) >> 24) & 0xFF) == 'c' - && char((sal_uInt32(nFeatureCode) >> 16) & 0xFF) == 'v'; + return ((sal_uInt32(nFeatureCode) >> 24) & 0xFF) == 'c' + && ((sal_uInt32(nFeatureCode) >> 16) & 0xFF) == 'v'; } bool isStylisticSetCode(sal_uInt32 nFeatureCode) { - return char((sal_uInt32(nFeatureCode) >> 24) & 0xFF) == 's' - && char((sal_uInt32(nFeatureCode) >> 16) & 0xFF) == 's'; + return ((sal_uInt32(nFeatureCode) >> 24) & 0xFF) == 's' + && ((sal_uInt32(nFeatureCode) >> 16) & 0xFF) == 's'; } OUString getNumericLowerPart(sal_uInt32 nFeatureCode)
