diff --git a/src/display/canvas.cc b/src/display/canvas.cc index 49d1e124..93f3e86d 100644 --- a/src/display/canvas.cc +++ b/src/display/canvas.cc @@ -106,7 +106,7 @@ Canvas::build_colors() { return; // basic color names, index maps to ncurses COLOR_* - static const char* color_names[] = { + static constexpr std::array color_names{ "black", "red", "green", "yellow", "blue", "magenta", "cyan", "white"}; // Those hold the background colors of "odd" and "even" diff --git a/src/display/color_map.h b/src/display/color_map.h index 3a9fb1e0..d91133ab 100644 --- a/src/display/color_map.h +++ b/src/display/color_map.h @@ -1,6 +1,7 @@ #ifndef RTORRENT_DISPLAY_COLOR_MAP_H #define RTORRENT_DISPLAY_COLOR_MAP_H +#include #include #include @@ -26,8 +27,8 @@ enum ColorKind { RCOLOR_MAX, }; -static const char* color_vars[RCOLOR_MAX] = { - 0, +static const std::array color_vars{ + nullptr, "ui.color.title", "ui.color.footer", "ui.color.focus",