From 7423629f0abec966bd9403800ca0bd5c96a8b3a6 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jun 2016 09:30:02 +0100 Subject: cppcheck: oppositeInnerCondition if new fails, its going to throw not return nullptr Change-Id: I8f46e49b28fd9547fb3e32dca0c6b99ee2cd5c7d --- lingucomponent/source/spellcheck/spell/sspellimp.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lingucomponent') diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 69836bc22cb4..1d291f1a7afb 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -334,9 +334,7 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL #endif aDicts[i] = new Hunspell(aTmpaff.getStr(),aTmpdict.getStr()); - aDEncs[i] = RTL_TEXTENCODING_DONTKNOW; - if (aDicts[i]) - aDEncs[i] = getTextEncodingFromCharset(aDicts[i]->get_dic_encoding()); + aDEncs[i] = getTextEncodingFromCharset(aDicts[i]->get_dic_encoding()); } pMS = aDicts[i]; eEnc = aDEncs[i]; -- cgit v1.2.3