Skip to content

Commit

Permalink
ScrollView: Optimize local table_colors
Browse files Browse the repository at this point in the history
It is constant, and the values are in the range 0...255,
so its size can be reduced.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 20, 2018
1 parent d364750 commit b0ace0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viewer/scrollview.cpp
Expand Up @@ -184,7 +184,7 @@ void* ScrollView::MessageReceiver(void* a) {
}

// Table to implement the color index values in the old system.
int table_colors[ScrollView::GREEN_YELLOW+1][4]= {
static const uint8_t table_colors[ScrollView::GREEN_YELLOW+1][4]= {
{0, 0, 0, 0}, // NONE (transparent)
{0, 0, 0, 255}, // BLACK.
{255, 255, 255, 255}, // WHITE.
Expand Down

0 comments on commit b0ace0e

Please sign in to comment.