summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-08-17 13:50:20 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-08-17 13:50:20 +0200
commit9fa6d9f9ddb3893d4e1d99673ffbb5076fdb56ab (patch)
treebbba460d7ab3f4f0ab266e7147707dd06ab13c8a
parent1f3dbe585be2d71740529f4bf460b118213bcf92 (diff)
downloadvdr-9fa6d9f9ddb3893d4e1d99673ffbb5076fdb56ab.tar.gz
vdr-9fa6d9f9ddb3893d4e1d99673ffbb5076fdb56ab.tar.bz2
Optimized cMenuEditChrItem::Set()
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--menuitems.c9
3 files changed, 6 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 2f6863ba..266f9490 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2140,6 +2140,7 @@ Tobias Bratfisch <tobias@reel-multimedia.com>
for improving numdigits(), isnumber() and strreplace()
for suggesting to make skipspace() an inline function
for making some optimizations in cDvbDevice::SetChannelDevice()
+ for optimizing cMenuEditChrItem::Set()
Bruno Roussel <bruno.roussel@free.fr>
for translating OSD texts to the French language
diff --git a/HISTORY b/HISTORY
index 76c2ae2b..3404c46d 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5366,3 +5366,4 @@ Video Disk Recorder Revision History
- I18nInitialize() now uses best matching default locale (problem reported by
Matthias Schwarzott).
- Some optimizations in cDvbDevice::SetChannelDevice() (thanks to Tobias Bratfisch).
+- Optimized cMenuEditChrItem::Set() (thanks to Tobias Bratfisch).
diff --git a/menuitems.c b/menuitems.c
index 44661ec1..a900e4a8 100644
--- a/menuitems.c
+++ b/menuitems.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menuitems.c 1.50 2007/08/04 09:12:18 kls Exp $
+ * $Id: menuitems.c 1.51 2007/08/17 13:48:07 kls Exp $
*/
#include "menuitems.h"
@@ -222,7 +222,8 @@ cMenuEditChrItem::~cMenuEditChrItem()
void cMenuEditChrItem::Set(void)
{
char buf[2];
- snprintf(buf, sizeof(buf), "%c", *value);
+ buf[0] = *value;
+ buf[1] = '\0';
SetValue(buf);
}
@@ -490,9 +491,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
break;
case kBlue|k_Repeat:
case kBlue: // consume the key only if in edit-mode
- if (InEditMode())
- ;
- else
+ if (!InEditMode())
return osUnknown;
break;
case kLeft|k_Repeat: