Skip to content

Commit 0b440e1

Browse files
committed
showimage, showanim: constify col[] array
1 parent 0dfa3d8 commit 0b440e1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/showanim.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
/* Draw a Gimpish background pattern to show transparency in the image */
2727
static void draw_background(SDL_Renderer *renderer, int w, int h)
2828
{
29-
SDL_Color col[2] = {
29+
const SDL_Color col[2] = {
3030
{ 0x66, 0x66, 0x66, 0xff },
31-
{ 0x99, 0x99, 0x99, 0xff },
31+
{ 0x99, 0x99, 0x99, 0xff }
3232
};
33-
int i, x, y;
3433
SDL_Rect rect;
34+
int i, x, y;
3535

3636
rect.w = 8;
3737
rect.h = 8;

examples/showimage.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
/* Draw a Gimpish background pattern to show transparency in the image */
2727
static void draw_background(SDL_Renderer *renderer, int w, int h)
2828
{
29-
SDL_Color col[2] = {
29+
const SDL_Color col[2] = {
3030
{ 0x66, 0x66, 0x66, 0xff },
31-
{ 0x99, 0x99, 0x99, 0xff },
31+
{ 0x99, 0x99, 0x99, 0xff }
3232
};
33-
int i, x, y;
3433
SDL_Rect rect;
34+
int i, x, y;
3535

3636
rect.w = 8;
3737
rect.h = 8;

0 commit comments

Comments
 (0)