X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=test_util.cpp;h=a3ccb5c5f04cebcd3c804c294e95e93d7b886a59;hp=d7e4fede1586723a9037792b431f1459989f58ae;hb=95edbfccb0843da3cc105dadc5bc6d8e102f6071;hpb=a5f32397f9c23fa8644fe195865d6c36685cf866 diff --git a/test_util.cpp b/test_util.cpp index d7e4fed..a3ccb5c 100644 --- a/test_util.cpp +++ b/test_util.cpp @@ -149,15 +149,15 @@ void EffectChainTester::run(float *out_data, GLenum format, Colorspace color_spa glReadPixels(0, 0, width, height, GL_RGBA, GL_FLOAT, temp); check_error(); if (format == GL_ALPHA) { - for (int i = 0; i < width * height; ++i) { + for (unsigned i = 0; i < width * height; ++i) { out_data[i] = temp[i * 4 + 3]; } } else if (format == GL_BLUE) { - for (int i = 0; i < width * height; ++i) { + for (unsigned i = 0; i < width * height; ++i) { out_data[i] = temp[i * 4 + 2]; } } else { - for (int i = 0; i < width * height; ++i) { + for (unsigned i = 0; i < width * height; ++i) { out_data[i] = temp[i * 4]; } } @@ -190,15 +190,15 @@ void EffectChainTester::run(unsigned char *out_data, GLenum format, Colorspace c glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, temp); check_error(); if (format == GL_ALPHA) { - for (int i = 0; i < width * height; ++i) { + for (unsigned i = 0; i < width * height; ++i) { out_data[i] = temp[i * 4 + 3]; } } else if (format == GL_BLUE) { - for (int i = 0; i < width * height; ++i) { + for (unsigned i = 0; i < width * height; ++i) { out_data[i] = temp[i * 4 + 2]; } } else { - for (int i = 0; i < width * height; ++i) { + for (unsigned i = 0; i < width * height; ++i) { out_data[i] = temp[i * 4]; } }