From 2cb3edd0ebf8f9f70db0bab65db367d3b1489adb Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 4 Apr 2012 18:45:40 +0400 Subject: [PATCH] gui/channellist.cpp: remove switch(), use CRCInput::getNumericValue --- src/gui/channellist.cpp | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index b87ad1a8f..09472b73b 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -757,38 +757,7 @@ int CChannelList::show() } else if (CRCInput::isNumeric(msg) && (this->historyMode || g_settings.sms_channel)) { if (this->historyMode) { //numeric zap - switch (msg) { - case CRCInput::RC_0: - selected = 0; - break; - case CRCInput::RC_1: - selected = 1; - break; - case CRCInput::RC_2: - selected = 2; - break; - case CRCInput::RC_3: - selected = 3; - break; - case CRCInput::RC_4: - selected = 4; - break; - case CRCInput::RC_5: - selected = 5; - break; - case CRCInput::RC_6: - selected = 6; - break; - case CRCInput::RC_7: - selected = 7; - break; - case CRCInput::RC_8: - selected = 8; - break; - case CRCInput::RC_9: - selected = 9; - break; - }; + selected = CRCInput::getNumericValue(msg); zapOnExit = true; loop = false; }