From dac2303f4be71f76041aef73eebe9b660d66e305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 23 Dec 2010 12:45:41 +0000 Subject: [PATCH] cppcheck: the scope of this variable can be reduced --- starmath/source/dialog.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index ee691ab948c4..42efa21da50d 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1974,8 +1974,7 @@ void SmSymDefineDialog::UpdateButtons() { bool bAdd = false, bChange = false, - bDelete = false, - bEqual; + bDelete = false; XubString aTmpSymbolName (aSymbols.GetText()), aTmpSymbolSetName (aSymbolSets.GetText()); @@ -1983,7 +1982,7 @@ void SmSymDefineDialog::UpdateButtons() { // alle Einstellungen gleich? //! (Font-, Style- und SymbolSet Name werden nicht case sensitiv verglichen) - bEqual = pOrigSymbol + bool bEqual = pOrigSymbol && aTmpSymbolSetName.EqualsIgnoreCaseAscii(aOldSymbolSetName.GetText()) && aTmpSymbolName.Equals(pOrigSymbol->GetName()) && aFonts.GetSelectEntry().EqualsIgnoreCaseAscii( @@ -2000,7 +1999,7 @@ void SmSymDefineDialog::UpdateButtons() // aendern nur falls altes Symbol vorhanden und am neuen etwas anders ist bChange = pOrigSymbol && !bEqual; -} + } aAddBtn .Enable(bAdd); aChangeBtn.Enable(bChange);