1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Optimized cMenuEditChrItem::Set()

This commit is contained in:
Klaus Schmidinger 2007-08-17 13:50:20 +02:00
parent 1f3dbe585b
commit 9fa6d9f9dd
3 changed files with 6 additions and 5 deletions

View File

@ -2140,6 +2140,7 @@ Tobias Bratfisch <tobias@reel-multimedia.com>
for improving numdigits(), isnumber() and strreplace() for improving numdigits(), isnumber() and strreplace()
for suggesting to make skipspace() an inline function for suggesting to make skipspace() an inline function
for making some optimizations in cDvbDevice::SetChannelDevice() for making some optimizations in cDvbDevice::SetChannelDevice()
for optimizing cMenuEditChrItem::Set()
Bruno Roussel <bruno.roussel@free.fr> Bruno Roussel <bruno.roussel@free.fr>
for translating OSD texts to the French language for translating OSD texts to the French language

View File

@ -5366,3 +5366,4 @@ Video Disk Recorder Revision History
- I18nInitialize() now uses best matching default locale (problem reported by - I18nInitialize() now uses best matching default locale (problem reported by
Matthias Schwarzott). Matthias Schwarzott).
- Some optimizations in cDvbDevice::SetChannelDevice() (thanks to Tobias Bratfisch). - Some optimizations in cDvbDevice::SetChannelDevice() (thanks to Tobias Bratfisch).
- Optimized cMenuEditChrItem::Set() (thanks to Tobias Bratfisch).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "menuitems.h"
@ -222,7 +222,8 @@ cMenuEditChrItem::~cMenuEditChrItem()
void cMenuEditChrItem::Set(void) void cMenuEditChrItem::Set(void)
{ {
char buf[2]; char buf[2];
snprintf(buf, sizeof(buf), "%c", *value); buf[0] = *value;
buf[1] = '\0';
SetValue(buf); SetValue(buf);
} }
@ -490,9 +491,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
break; break;
case kBlue|k_Repeat: case kBlue|k_Repeat:
case kBlue: // consume the key only if in edit-mode case kBlue: // consume the key only if in edit-mode
if (InEditMode()) if (!InEditMode())
;
else
return osUnknown; return osUnknown;
break; break;
case kLeft|k_Repeat: case kLeft|k_Repeat: