From 3479c57de10bf6c922c71544b79e04aa707ac80f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 20 Mar 2014 23:10:24 +0100 Subject: [PATCH] Fix a few signed/unsigned warnings. --- test_util.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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]; } } -- 2.39.2