From d4f5e242366e61603452af739d5e53f69c6025f0 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 21 Nov 2016 00:22:50 +0100 Subject: [PATCH] settings_manager_teams: simplify hintbox calls Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d04cb3b9cd0d28bf958a8213812dd2215d23320d Author: vanhofen Date: 2016-11-21 (Mon, 21 Nov 2016) Origin message was: ------------------ - settings_manager_teams: simplify hintbox calls ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/settings_manager_teams.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/settings_manager_teams.cpp b/src/gui/settings_manager_teams.cpp index 43fa6294f..e1a033b2c 100644 --- a/src/gui/settings_manager_teams.cpp +++ b/src/gui/settings_manager_teams.cpp @@ -164,15 +164,14 @@ void CSettingsManagerTeams::doBackup() int ret = ::statfs(TDirectory.c_str(), &s); if(objectCounter && ret == 0 && s.f_type != 0x72b6L/* && s.f_type != 0x858458f6L*/) /*jffs2 and ramfs*/ { - CHintBox * hintBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, hintBoxContent.c_str()); - hintBox->paint(); + CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, hintBoxContent.c_str()); + hintBox.paint(); char buf[256]; sprintf(buf, SYSCALLBACKUP " %s/" TARCHIVE "%s", TDirectory.c_str(), objects.c_str()); //printf("CSettingsManagerTeams::doBackup: %s/%s\n", TDirectory.c_str(), TARCHIVE); if (system(buf) != 0) printf("CSettingsManagerTeams::Backup: failed\n"); - hintBox->hide(); - delete hintBox; + hintBox.hide(); } else ShowMsg(LOCALE_MESSAGEBOX_ERROR, g_Locale->getText(LOCALE_SETTINGS_TEAMS_BACKUP_FAILED),CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_ERROR);