OSDN Git Service

meta: Move loop variable declaration outside for loop.
authorVinson Lee <vlee@freedesktop.org>
Wed, 16 Jan 2013 02:03:25 +0000 (18:03 -0800)
committerVinson Lee <vlee@freedesktop.org>
Wed, 16 Jan 2013 02:03:25 +0000 (18:03 -0800)
Fixes build with MSVC.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
src/mesa/drivers/common/meta.c

index 5cbb7da..e25481e 100644 (file)
@@ -1623,9 +1623,10 @@ blitframebuffer_texture(struct gl_context *ctx,
          GLuint sampler, samplerSave =
             ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler ?
             ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler->Name : 0;
+         int i;
 
          /* Iterate through all draw buffers */
-         for (int i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
+         for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
             int idx = ctx->DrawBuffer->_ColorDrawBufferIndexes[i];
             if (idx == -1)
                continue;