From ab826b141724fbf6aa50ad7eacb7335807b20bf9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 18 May 2011 22:49:15 +0100 Subject: remove redundant checks --- .../source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'lingucomponent/source') diff --git a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx index 8324c4fcba0b..768661d28a1c 100644 --- a/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx @@ -95,25 +95,19 @@ Hyphenator::Hyphenator() : numdict = 0; } - Hyphenator::~Hyphenator() { if (pPropHelper) pPropHelper->RemoveAsPropListener(); - if ((numdict) && (aDicts)) + if (numdict && aDicts) { - for (int i=0; i < numdict; i++) - { - if (aDicts[i].apCC) delete aDicts[i].apCC; - aDicts[i].apCC = NULL; - } + for (int i=0; i < numdict; ++i) + delete aDicts[i].apCC; } - if (aDicts) delete[] aDicts; - aDicts = NULL; - numdict = 0; -} + delete[] aDicts; +} PropertyHelper_Hyphen & Hyphenator::GetPropHelper_Impl() { -- cgit