diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-06-20 09:30:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-20 12:34:58 +0100 |
commit | 7423629f0abec966bd9403800ca0bd5c96a8b3a6 (patch) | |
tree | 1634830c0dc10e3b3867b3fdcc9e62ac969fb52b /lingucomponent | |
parent | a2effff0d0c9b5f86cd6721982fa2e162b73142f (diff) |
cppcheck: oppositeInnerCondition if new fails, its going to throw
not return nullptr
Change-Id: I8f46e49b28fd9547fb3e32dca0c6b99ee2cd5c7d
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/spellcheck/spell/sspellimp.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
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]; |