From 587b4b4b238fec072017a37a2d5e9ace174fe104 Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Fri, 20 Jan 2023 21:13:14 +0100 Subject: [PATCH] Fix compiler warning: integer expressions of different signedness Signed-off-by: Steffen Pankratz --- PuyoGame.cpp | 2 +- PuyoGame.h | 4 ++-- glSDL.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PuyoGame.cpp b/PuyoGame.cpp index 7916ee7..9b29504 100644 --- a/PuyoGame.cpp +++ b/PuyoGame.cpp @@ -37,7 +37,7 @@ PuyoRandomSystem::PuyoRandomSystem() srandom(SDL_GetTicks()); } -PuyoState PuyoRandomSystem::getPuyoForSequence(int sequence) +PuyoState PuyoRandomSystem::getPuyoForSequence(unsigned int sequence) { if (sequenceItems.size() <= sequence) { PuyoState newItem = static_cast((random() % 5) + PUYO_FALLINGBLUE); diff --git a/PuyoGame.h b/PuyoGame.h index 94e18b0..93adc6d 100644 --- a/PuyoGame.h +++ b/PuyoGame.h @@ -34,7 +34,7 @@ enum PuyoState { class PuyoRandomSystem { public: PuyoRandomSystem(); - PuyoState getPuyoForSequence(int sequence); + PuyoState getPuyoForSequence(unsigned int sequence); private: std::vector sequenceItems; }; @@ -163,7 +163,7 @@ class PuyoGame { PuyoPuyo *puyoCells[PUYODIMX * (PUYODIMY+1)]; PuyoRandomSystem *attachedRandom; - int sequenceNr; + unsigned int sequenceNr; int neutralPuyos; PuyoDelegate *delegate; PuyoFactory *attachedFactory; diff --git a/glSDL.c b/glSDL.c index 08c14cb..180ebe2 100644 --- a/glSDL.c +++ b/glSDL.c @@ -973,7 +973,7 @@ static __inline__ void gl_blendfunc(GLenum sfactor, GLenum dfactor) glstate.dfactor = dfactor; } -static __inline__ void gl_texture(GLuint tx) +static __inline__ void gl_texture(GLint tx) { if(tx == glstate.texture) return;