diff --git a/examples/fill.cc b/examples/fill.cc index 504d714..83c61fa 100644 --- a/examples/fill.cc +++ b/examples/fill.cc @@ -36,7 +36,7 @@ using namespace SDL2pp; static const float pi = 3.14159265358979323846f; -int Run() { +static int Run() { SDL sdl(SDL_INIT_VIDEO); SDLImage image(IMG_INIT_PNG); // optional Window window("libSDL2pp demo: fill", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_RESIZABLE); diff --git a/examples/rendertarget.cc b/examples/rendertarget.cc index 8f7216f..fc6d431 100644 --- a/examples/rendertarget.cc +++ b/examples/rendertarget.cc @@ -31,7 +31,7 @@ using namespace SDL2pp; #define RGBA(r, g, b, a) r, g, b, a -unsigned char pixels[4 * 4 * 4] = { +static const unsigned char pixels[4 * 4 * 4] = { RGBA(0xff, 0x00, 0x00, 0xff), RGBA(0xff, 0x80, 0x00, 0xff), RGBA(0xff, 0xff, 0x00, 0xff), RGBA(0x80, 0xff, 0x00, 0xff), RGBA(0xff, 0x00, 0x80, 0xff), RGBA(0xff, 0xff, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0xff, 0x00, 0xff), RGBA(0xff, 0x00, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0x00, 0x00, 0xff), RGBA(0x00, 0xff, 0x80, 0xff), diff --git a/examples/sprites.cc b/examples/sprites.cc index 97fad08..24f7304 100644 --- a/examples/sprites.cc +++ b/examples/sprites.cc @@ -31,7 +31,7 @@ using namespace SDL2pp; #define RGBA(r, g, b, a) r, g, b, a -unsigned char pixels[4 * 4 * 4] = { +static const unsigned char pixels[4 * 4 * 4] = { RGBA(0xff, 0x00, 0x00, 0xff), RGBA(0xff, 0x80, 0x00, 0xff), RGBA(0xff, 0xff, 0x00, 0xff), RGBA(0x80, 0xff, 0x00, 0xff), RGBA(0xff, 0x00, 0x80, 0xff), RGBA(0xff, 0xff, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0xff, 0x00, 0xff), RGBA(0xff, 0x00, 0xff, 0xff), RGBA(0x00, 0x00, 0x00, 0x00), RGBA(0x00, 0x00, 0x00, 0xff), RGBA(0x00, 0xff, 0x80, 0xff),