mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Improved conversion from color enum to string and vice versa.
The stringToColor() and colorToString() methods were changed into file-scope functions, so they can be inlined by the compiler. The colorNames array is now used for lookups in both directions, removing duplication of the color names. The missing "selectionBg" entry was added to the colorNames array.
This commit is contained in:
@@ -52,6 +52,7 @@ extern const char *CARD_ROOT;
|
||||
|
||||
extern void jz_cpuspeed(unsigned clockspeed);
|
||||
|
||||
// Note: Keep this in sync with colorNames!
|
||||
enum color {
|
||||
COLOR_TOP_BAR_BG,
|
||||
COLOR_BOTTOM_BAR_BG,
|
||||
@@ -144,9 +145,6 @@ private:
|
||||
void gp2x_deinit();
|
||||
void toggleTvOut();
|
||||
|
||||
enum color stringToColor(const string &name);
|
||||
const string &colorToString(enum color);
|
||||
|
||||
public:
|
||||
GMenu2X();
|
||||
~GMenu2X();
|
||||
|
||||
Reference in New Issue
Block a user