Skip to content

Commit

Permalink
IPHONE: Silence a few signed/unsigned integer comparison warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Schickel committed Feb 23, 2012
1 parent 99ffbfe commit e00fc73
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions backends/platform/iphone/iphone_common.h
Expand Up @@ -57,16 +57,16 @@ enum GraphicsModes {

struct VideoContext {
// Game screen state
int screenWidth, screenHeight;
uint screenWidth, screenHeight;

// Overlay state
bool overlayVisible;
int overlayWidth, overlayHeight;
uint overlayWidth, overlayHeight;

// Mouse cursor state
int mouseX, mouseY;
uint mouseX, mouseY;
int mouseHotspotX, mouseHotspotY;
int mouseWidth, mouseHeight;
uint mouseWidth, mouseHeight;
bool mouseIsVisible;

// Misc state
Expand Down
12 changes: 6 additions & 6 deletions backends/platform/iphone/osys_video.mm
Expand Up @@ -137,11 +137,11 @@
y = 0;
}

if (w > _videoContext.screenWidth - x) {
if (w > (int)_videoContext.screenWidth - x) {
w = _videoContext.screenWidth - x;
}

if (h > _videoContext.screenHeight - y) {
if (h > (int)_videoContext.screenHeight - y) {
h = _videoContext.screenHeight - y;
}

Expand All @@ -154,7 +154,7 @@


byte *dst = _gameScreenRaw + y * _videoContext.screenWidth + x;
if (_videoContext.screenWidth == pitch && pitch == w)
if ((int)_videoContext.screenWidth == pitch && pitch == w)
memcpy(dst, buf, h * w);
else {
do {
Expand Down Expand Up @@ -300,10 +300,10 @@
y = 0;
}

if (w > _videoContext.overlayWidth - x)
if (w > (int)_videoContext.overlayWidth - x)
w = _videoContext.overlayWidth - x;

if (h > _videoContext.overlayHeight - y)
if (h > (int)_videoContext.overlayHeight - y)
h = _videoContext.overlayHeight - y;

if (w <= 0 || h <= 0)
Expand All @@ -314,7 +314,7 @@
}

OverlayColor *dst = _overlayBuffer + (y * _videoContext.overlayWidth + x);
if (_videoContext.overlayWidth == pitch && pitch == w)
if ((int)_videoContext.overlayWidth == pitch && pitch == w)
memcpy(dst, buf, h * w * sizeof(OverlayColor));
else {
do {
Expand Down

0 comments on commit e00fc73

Please sign in to comment.