From ec6c5e7974190a87039b4767d96d820b0492ea7a Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 25 Oct 2013 13:53:36 +0400 Subject: [PATCH] gui/personalize.cpp: fix memleak, fix warnings Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6b58f32c4802aef24a1cdfc26a8fbec20ef206cd Author: [CST] Focus Date: 2013-10-25 (Fri, 25 Oct 2013) --- src/gui/personalize.cpp | 5 ++--- src/gui/personalize.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index a7a112988..0d96acc41 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -290,7 +290,6 @@ int CPersonalizeGui::ShowPersonalizationMenu() CPINChangeWidget *pinChangeWidget = NULL; if (!g_settings.easymenu && show_pin_setup) ShowPinSetup(pMenu, pinChangeWidget); - printf("CPersonalizeGui::ShowPinSetup: pinChangeWidget %x\n", pinChangeWidget); int res; if (g_settings.easymenu) { @@ -307,7 +306,7 @@ int CPersonalizeGui::ShowPersonalizationMenu() const neutrino_msg_t key = (count == 0) ? CRCInput::RC_red : (count == 1) ? CRCInput::RC_green : (count == 2) ? CRCInput::RC_yellow : - (count == 3) ? CRCInput::RC_blue : NULL; + (count == 3) ? CRCInput::RC_blue : CRCInput::RC_nokey; count++; string itm_name = g_Locale->getText(v_item[j].locale_name); itm_name += " "; @@ -370,7 +369,7 @@ int CPersonalizeGui::ShowPersonalizationMenu() } //init pin setup dialog -void CPersonalizeGui::ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget *pin_widget) +void CPersonalizeGui::ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget * &pin_widget) { pin_widget = new CPINChangeWidget(LOCALE_PERSONALIZE_PINCODE, g_settings.personalize_pincode, 4, LOCALE_PERSONALIZE_PINHINT); diff --git a/src/gui/personalize.h b/src/gui/personalize.h index fe34339c4..2ce9b0045 100644 --- a/src/gui/personalize.h +++ b/src/gui/personalize.h @@ -164,7 +164,7 @@ class CPersonalizeGui : public CMenuTarget, public CChangeObserver, public CPINP int ShowPersonalizationMenu(); int ShowMenuOptions(const int& menu); void ShowHelpPersonalize(); - void ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget *pin_widget); + void ShowPinSetup(CMenuWidget* p_widget, CPINChangeWidget * &pin_widget); void ShowUserMenu(CMenuWidget* p_widget, std::vector &v_umenu); void ShowPluginMenu(CMenuWidget* p_widget); void ShowPreverredKeySetup(CMenuWidget* p_widget);