From 4b557ffbccf4062b0626ab8d068fa6103ba6a837 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 12 Jan 2018 20:20:29 +0100 Subject: More loplugin:cstylecast: lingucomponent auto-rewrite with "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I0aed24dcacb95873df50e34a41a54979ad725e9d --- lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx') diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index 8aa3c2e5e4aa..4bdaa74d0a2a 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -406,7 +406,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo { if (eEnc == RTL_TEXTENCODING_UTF8) { - if (((unsigned char) *c) >> 6 != 2) + if (static_cast(*c) >> 6 != 2) leftrep++; } else @@ -468,17 +468,17 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo } // handle shortening - sal_Int16 nPos = (sal_Int16) ((nHyphenationPosAltHyph < nHyphenationPos) ? + sal_Int16 nPos = static_cast((nHyphenationPosAltHyph < nHyphenationPos) ? nHyphenationPosAltHyph : nHyphenationPos); // discretionary hyphenation xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), nPos, aWord.replaceAt(nHyphenationPosAlt + 1, cut[nHyphenationPos], repHyph), - (sal_Int16) nHyphenationPosAltHyph); + static_cast(nHyphenationPosAltHyph)); } else { xRes = HyphenatedWord::CreateHyphenatedWord( aWord, LinguLocaleToLanguage( aLocale ), - (sal_Int16)nHyphenationPos, aWord, (sal_Int16) nHyphenationPos); + static_cast(nHyphenationPos), aWord, static_cast(nHyphenationPos)); } } -- cgit v1.2.3