From 95cc5127e02b84d2baafc77d5551672ec270fd52 Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Sun, 17 Jul 2016 13:25:23 +0000 Subject: [PATCH] TINYGL: Consistently consider Texture::handle as unsigned. Texture handles are unsigned integers everywhere else. --- graphics/tinygl/texture.cpp | 4 ++-- graphics/tinygl/zgl.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphics/tinygl/texture.cpp b/graphics/tinygl/texture.cpp index 1c583cd959f..ac43cb0ca60 100644 --- a/graphics/tinygl/texture.cpp +++ b/graphics/tinygl/texture.cpp @@ -34,7 +34,7 @@ namespace TinyGL { -static GLTexture *find_texture(GLContext *c, int h) { +static GLTexture *find_texture(GLContext *c, unsigned int h) { GLTexture *t; t = c->shared_state.texture_hash_table[h % TEXTURE_HASH_TABLE_SIZE]; @@ -279,7 +279,7 @@ void glopPixelStore(GLContext *, GLParam *p) { void tglGenTextures(int n, unsigned int *textures) { TinyGL::GLContext *c = TinyGL::gl_get_context(); - int max; + unsigned int max; TinyGL::GLTexture *t; max = 0; diff --git a/graphics/tinygl/zgl.h b/graphics/tinygl/zgl.h index e247c152c70..bff54554489 100644 --- a/graphics/tinygl/zgl.h +++ b/graphics/tinygl/zgl.h @@ -181,7 +181,7 @@ struct GLImage { struct GLTexture { GLImage images[MAX_TEXTURE_LEVELS]; - int handle; + unsigned int handle; int versionNumber; struct GLTexture *next, *prev; bool disposed;