From fc528a468061e165ee29f0ca450245331da3ef93 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 19 Jan 2018 17:45:53 +0100 Subject: More loplugin:cstylecast on macOS Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870 Reviewed-on: https://gerrit.libreoffice.org/48216 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lingucomponent/source') diff --git a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm index 66ba35f017f7..15a195c52a02 100644 --- a/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm +++ b/lingucomponent/source/spellcheck/macosxspell/macspellimp.mm @@ -115,7 +115,7 @@ Sequence< Locale > SAL_CALL MacSpellChecker::getLocales() //Test for existence of the dictionaries for (NSUInteger i = 0; i < [aLocales count]; i++) { - NSString* pLangStr = (NSString*)[aLocales objectAtIndex:i]; + NSString* pLangStr = static_cast([aLocales objectAtIndex:i]); if( [[NSSpellChecker sharedSpellChecker] setLanguage:pLangStr ] ) { postspdict.push_back( pLangStr ); @@ -349,7 +349,7 @@ Reference< XSpellAlternatives > { // if needed add: if (suglst[ii] == NULL) continue; NSString* guess = [guesses objectAtIndex:ii]; - OUString cvtwrd(reinterpret_cast([guess cStringUsingEncoding:NSUnicodeStringEncoding]), (sal_Int32)[guess length]); + OUString cvtwrd(reinterpret_cast([guess cStringUsingEncoding:NSUnicodeStringEncoding]), static_cast([guess length])); pStr[ii] = cvtwrd; } } -- cgit