Fixed compiler warning
authorSam Lantinga
Sat, 08 Jun 2019 19:12:05 -0700
changeset 128088a4b1beb4f6e
parent 12807 a39d8cdf50f4
child 12809 572f29f98da0
Fixed compiler warning
warning C4018: '<' : signed/unsigned mismatch
src/render/SDL_render.c
     1.1 --- a/src/render/SDL_render.c	Sat Jun 08 19:09:43 2019 -0700
     1.2 +++ b/src/render/SDL_render.c	Sat Jun 08 19:12:05 2019 -0700
     1.3 @@ -1222,14 +1222,14 @@
     1.4      /* No alpha, but a colorkey => promote to alpha */
     1.5      if (!fmt->Amask && SDL_HasColorKey(surface)) {
     1.6          if (fmt->format == SDL_PIXELFORMAT_RGB888) {
     1.7 -            for (i = 0; i < renderer->info.num_texture_formats; ++i) {
     1.8 +            for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
     1.9                  if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ARGB8888) {
    1.10                      format = SDL_PIXELFORMAT_ARGB8888;
    1.11                      break;
    1.12                  }
    1.13              }
    1.14          } else if (fmt->format == SDL_PIXELFORMAT_BGR888) {
    1.15 -            for (i = 0; i < renderer->info.num_texture_formats; ++i) {
    1.16 +            for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
    1.17                  if (renderer->info.texture_formats[i] == SDL_PIXELFORMAT_ABGR8888) {
    1.18                      format = SDL_PIXELFORMAT_ABGR8888;
    1.19                      break;
    1.20 @@ -1238,7 +1238,7 @@
    1.21          }
    1.22      } else {
    1.23          /* Exact match would be fine */
    1.24 -        for (i = 0; i < renderer->info.num_texture_formats; ++i) {
    1.25 +        for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
    1.26              if (renderer->info.texture_formats[i] == fmt->format) {
    1.27                  format = fmt->format;
    1.28                  break;
    1.29 @@ -1249,7 +1249,7 @@
    1.30      /* Fallback, choose a valid pixel format */
    1.31      if (format == SDL_PIXELFORMAT_UNKNOWN) {
    1.32          format = renderer->info.texture_formats[0];
    1.33 -        for (i = 0; i < renderer->info.num_texture_formats; ++i) {
    1.34 +        for (i = 0; i < (int)renderer->info.num_texture_formats; ++i) {
    1.35              if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
    1.36                      SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == needAlpha) {
    1.37                  format = renderer->info.texture_formats[i];