mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 13:04:35 +03:00
Mark some things as const
Several string pointer arrays pointed to const strings but were not const themselves. A few various structures and arrays were also marked const.
This commit is contained in:
12
Meter.c
12
Meter.c
@ -336,7 +336,7 @@ static void BarMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
|
||||
#define PIXPERROW_UTF8 4
|
||||
static const char* GraphMeterMode_dotsUtf8[] = {
|
||||
static const char* const GraphMeterMode_dotsUtf8[] = {
|
||||
/*00*/" ", /*01*/"⢀", /*02*/"⢠", /*03*/"⢰", /*04*/ "⢸",
|
||||
/*10*/"⡀", /*11*/"⣀", /*12*/"⣠", /*13*/"⣰", /*14*/ "⣸",
|
||||
/*20*/"⡄", /*21*/"⣄", /*22*/"⣤", /*23*/"⣴", /*24*/ "⣼",
|
||||
@ -347,13 +347,13 @@ static const char* GraphMeterMode_dotsUtf8[] = {
|
||||
#endif
|
||||
|
||||
#define PIXPERROW_ASCII 2
|
||||
static const char* GraphMeterMode_dotsAscii[] = {
|
||||
static const char* const GraphMeterMode_dotsAscii[] = {
|
||||
/*00*/" ", /*01*/".", /*02*/":",
|
||||
/*10*/".", /*11*/".", /*12*/":",
|
||||
/*20*/":", /*21*/":", /*22*/":"
|
||||
};
|
||||
|
||||
static const char** GraphMeterMode_dots;
|
||||
static const char* const* GraphMeterMode_dots;
|
||||
static int GraphMeterMode_pixPerRow;
|
||||
|
||||
static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
@ -424,7 +424,7 @@ static void GraphMeterMode_draw(Meter* this, int x, int y, int w) {
|
||||
|
||||
/* ---------- LEDMeterMode ---------- */
|
||||
|
||||
static const char* LEDMeterMode_digitsAscii[] = {
|
||||
static const char* const LEDMeterMode_digitsAscii[] = {
|
||||
" __ "," "," __ "," __ "," "," __ "," __ "," __ "," __ "," __ ",
|
||||
"| |"," |"," __|"," __|","|__|","|__ ","|__ "," |","|__|","|__|",
|
||||
"|__|"," |","|__ "," __|"," |"," __|","|__|"," |","|__|"," __|"
|
||||
@ -432,7 +432,7 @@ static const char* LEDMeterMode_digitsAscii[] = {
|
||||
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
|
||||
static const char* LEDMeterMode_digitsUtf8[] = {
|
||||
static const char* const LEDMeterMode_digitsUtf8[] = {
|
||||
"┌──┐"," ┐ ","╶──┐","╶──┐","╷ ╷","┌──╴","┌──╴","╶──┐","┌──┐","┌──┐",
|
||||
"│ │"," │ ","┌──┘"," ──┤","└──┤","└──┐","├──┐"," │","├──┤","└──┤",
|
||||
"└──┘"," ╵ ","└──╴","╶──┘"," ╵","╶──┘","└──┘"," ╵","└──┘"," ──┘"
|
||||
@ -440,7 +440,7 @@ static const char* LEDMeterMode_digitsUtf8[] = {
|
||||
|
||||
#endif
|
||||
|
||||
static const char** LEDMeterMode_digits;
|
||||
static const char* const* LEDMeterMode_digits;
|
||||
|
||||
static void LEDMeterMode_drawDigit(int x, int y, int n) {
|
||||
for (int i = 0; i < 3; i++)
|
||||
|
Reference in New Issue
Block a user