diff --git a/src/gui/glcdsetup.cpp b/src/gui/glcdsetup.cpp index 96c5e0b61..ab0b698cb 100644 --- a/src/gui/glcdsetup.cpp +++ b/src/gui/glcdsetup.cpp @@ -39,8 +39,7 @@ #include #include "glcdthemes.h" -#define ONOFFSEC_OPTION_COUNT 6 -static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[ONOFFSEC_OPTION_COUNT] = { +static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[] = { { cGLCD::CLOCK_OFF, LOCALE_OPTIONS_OFF }, { cGLCD::CLOCK_SIMPLE, LOCALE_GLCD_STANDBY_SIMPLE_CLOCK }, { cGLCD::CLOCK_LED, LOCALE_GLCD_STANDBY_LED_CLOCK }, @@ -48,14 +47,15 @@ static const CMenuOptionChooser::keyval ONOFFSEC_OPTIONS[ONOFFSEC_OPTION_COUNT] { cGLCD::CLOCK_DIGITAL, LOCALE_GLCD_STANDBY_DIGITAL_CLOCK }, { cGLCD::CLOCK_ANALOG, LOCALE_GLCD_STANDBY_ANALOG_CLOCK } }; +#define ONOFFSEC_OPTION_COUNT (sizeof(ONOFFSEC_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) -#define ONOFFPRI_OPTION_COUNT 4 -static const CMenuOptionChooser::keyval ONOFFPRI_OPTIONS[ONOFFPRI_OPTION_COUNT] = { - { 0, LOCALE_GLCD_ALIGN_NONE }, - { 1, LOCALE_GLCD_ALIGN_LEFT }, - { 2, LOCALE_GLCD_ALIGN_CENTER }, - { 3, LOCALE_GLCD_ALIGN_RIGHT }, +static const CMenuOptionChooser::keyval ONOFFPRI_OPTIONS[] = { + { cGLCD::ALIGN_NONE, LOCALE_GLCD_ALIGN_NONE }, + { cGLCD::ALIGN_LEFT, LOCALE_GLCD_ALIGN_LEFT }, + { cGLCD::ALIGN_CENTER, LOCALE_GLCD_ALIGN_CENTER }, + { cGLCD::ALIGN_RIGHT, LOCALE_GLCD_ALIGN_RIGHT } }; +#define ONOFFPRI_OPTION_COUNT (sizeof(ONOFFPRI_OPTIONS)/sizeof(CMenuOptionChooser::keyval)) #if 0 #define KEY_GLCD_BLACK 0