mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Make some small arrays const.
This commit is contained in:
parent
99827ceee4
commit
448f1b55cd
@ -46,7 +46,7 @@ void
|
||||
draw_border_cross(struct terminal *term, int x, int y,
|
||||
enum border_cross_direction dir, struct color_pair *color)
|
||||
{
|
||||
static unsigned char border_trans[2][4] = {
|
||||
static const unsigned char border_trans[2][4] = {
|
||||
/* Used for BORDER_X_{RIGHT,LEFT}: */
|
||||
{ BORDER_SVLINE, BORDER_SRTEE, BORDER_SLTEE },
|
||||
/* Used for BORDER_X_{DOWN,UP}: */
|
||||
@ -191,7 +191,7 @@ void
|
||||
draw_border(struct terminal *term, struct box *box,
|
||||
struct color_pair *color, int width)
|
||||
{
|
||||
static enum border_char p1[] = {
|
||||
static const enum border_char p1[] = {
|
||||
BORDER_SULCORNER,
|
||||
BORDER_SURCORNER,
|
||||
BORDER_SDLCORNER,
|
||||
@ -199,7 +199,7 @@ draw_border(struct terminal *term, struct box *box,
|
||||
BORDER_SVLINE,
|
||||
BORDER_SHLINE,
|
||||
};
|
||||
static enum border_char p2[] = {
|
||||
static const enum border_char p2[] = {
|
||||
BORDER_DULCORNER,
|
||||
BORDER_DURCORNER,
|
||||
BORDER_DDLCORNER,
|
||||
@ -207,7 +207,7 @@ draw_border(struct terminal *term, struct box *box,
|
||||
BORDER_DVLINE,
|
||||
BORDER_DHLINE,
|
||||
};
|
||||
enum border_char *p = (width > 1) ? p2 : p1;
|
||||
const enum border_char *p = (width > 1) ? p2 : p1;
|
||||
struct box borderbox;
|
||||
|
||||
set_box(&borderbox, box->x - 1, box->y - 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user