diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-23 12:45:41 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-23 12:45:41 +0000 |
commit | dac2303f4be71f76041aef73eebe9b660d66e305 (patch) | |
tree | 22e92579c3af7a611dbadcb7fe9a47b818bf060e /starmath | |
parent | 14b8caf1cfa26b92af49810d6c747333e8d8940a (diff) |
cppcheck: the scope of this variable can be reduced
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/dialog.cxx | 7 |
1 files 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); |