From 1fd330008dd2640e0f48f5d29e12b81d9788f40c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 May 2017 16:37:16 +0200 Subject: [PATCH] CChannelList: change scope of bool unlocked Scope of the variable 'unlocked' can be reduced. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c8f6888d8f9eb968009f92a0124cc44487a1e3b3 Author: Thilo Graf Date: 2017-05-07 (Sun, 07 May 2017) ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 20ffa551c..4a3735f5b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -298,7 +298,7 @@ int CChannelList::doChannelMenu(void) int shortcut = 0; static int old_selected = 0; char cnt[5]; - bool unlocked = true; + int ret = 0; if(g_settings.minimode) @@ -360,7 +360,8 @@ int CChannelList::doChannelMenu(void) CBouquetList *blist = tvmode ? TVfavList : RADIOfavList; bool fav_found = true; switch(select) { - case 0: // edit mode + case 0: {// edit mode + bool unlocked = true; if (g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED) { int pl_z = g_settings.parentallock_zaptime * 60; if (g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT] == CPersonalizeGui::PERSONALIZE_MODE_PIN) { @@ -385,7 +386,7 @@ int CChannelList::doChannelMenu(void) editMode(true); ret = -1; break; - case 1: // add to + }case 1: // add to if (!addChannelToBouquet()) return -1; ret = 1;