From: Steinar H. Gunderson Date: Thu, 20 Mar 2014 22:10:24 +0000 (+0100) Subject: Fix a few signed/unsigned warnings. X-Git-Tag: 1.1~12^2~12 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=3479c57de10bf6c922c71544b79e04aa707ac80f Fix a few signed/unsigned warnings. --- 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]; } }