Skip to content

Commit b0ace0e

Browse files
committed
ScrollView: Optimize local table_colors
It is constant, and the values are in the range 0...255, so its size can be reduced. Signed-off-by: Stefan Weil <[email protected]>
1 parent d364750 commit b0ace0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/viewer/scrollview.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void* ScrollView::MessageReceiver(void* a) {
184184
}
185185

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

0 commit comments

Comments
 (0)