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 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

View File

@ -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).

View File

@ -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: