From 2d9775c36b7f9fc49d3a6ae8af11bc3d3822374e Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 20 Nov 2016 22:45:35 +0100 Subject: [PATCH] CBEBouquetWidget: simplify hintbox calls --- src/gui/bedit/bouqueteditor_bouquets.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 28223aa4a..f09ad4a66 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -502,18 +502,16 @@ std::string CBEBouquetWidget::inputName(const char * const defaultName, const ne void CBEBouquetWidget::saveChanges() { - CHintBox* hintBox= new CHintBox(LOCALE_BOUQUETEDITOR_NAME, g_Locale->getText(LOCALE_BOUQUETEDITOR_SAVINGCHANGES), 480); // UTF-8 - hintBox->paint(); + CHintBox hintBox(LOCALE_BOUQUETEDITOR_NAME, g_Locale->getText(LOCALE_BOUQUETEDITOR_SAVINGCHANGES), 480); // UTF-8 + hintBox.paint(); g_Zapit->saveBouquets(); - hintBox->hide(); - delete hintBox; + hintBox.hide(); } void CBEBouquetWidget::discardChanges() { - CHintBox* hintBox= new CHintBox(LOCALE_BOUQUETEDITOR_NAME, g_Locale->getText(LOCALE_BOUQUETEDITOR_DISCARDINGCHANGES), 480); // UTF-8 - hintBox->paint(); + CHintBox hintBox(LOCALE_BOUQUETEDITOR_NAME, g_Locale->getText(LOCALE_BOUQUETEDITOR_DISCARDINGCHANGES), 480); // UTF-8 + hintBox.paint(); g_Zapit->restoreBouquets(); - hintBox->hide(); - delete hintBox; + hintBox.hide(); }