aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2012-02-22 20:20:55 +0100
committerJohannes Schickel2012-02-22 20:20:55 +0100
commit442bcb7d3eb64f3fbde3ee5bd2b16e7c01bae469 (patch)
tree1414c9fd07408159d7457dc6ee3818725279d6d0
parentdac6ac66ad0a5ce0d99e089dacad1d72929d0f42 (diff)
downloadscummvm-rg350-442bcb7d3eb64f3fbde3ee5bd2b16e7c01bae469.tar.gz
scummvm-rg350-442bcb7d3eb64f3fbde3ee5bd2b16e7c01bae469.tar.bz2
scummvm-rg350-442bcb7d3eb64f3fbde3ee5bd2b16e7c01bae469.zip
ALL: Fix some signed/unsigned comparison warnings.
-rw-r--r--engines/agi/saveload.cpp4
-rw-r--r--engines/gob/hotspots.cpp2
-rw-r--r--graphics/cursorman.cpp4
-rw-r--r--gui/gui-manager.cpp7
4 files changed, 8 insertions, 9 deletions
diff --git a/engines/agi/saveload.cpp b/engines/agi/saveload.cpp
index 00d6a1c8dd..0ef6230374 100644
--- a/engines/agi/saveload.cpp
+++ b/engines/agi/saveload.cpp
@@ -221,8 +221,8 @@ int AgiEngine::saveGame(const Common::String &fileName, const Common::String &de
// Save image stack
- for (i = 0; i < _imageStack.size(); i++) {
- ImageStackElement ise = _imageStack[i];
+ for (Common::Stack<ImageStackElement>::size_type j = 0; j < _imageStack.size(); ++j) {
+ const ImageStackElement &ise = _imageStack[j];
out->writeByte(ise.type);
out->writeSint16BE(ise.parm1);
out->writeSint16BE(ise.parm2);
diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index 5e0af847de..9a89f11923 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -477,7 +477,7 @@ void Hotspots::call(uint16 offset) {
_shouldPush = true;
- int16 stackSize = _stack.size();
+ Common::Stack<StackEntry>::size_type stackSize = _stack.size();
_vm->_inter->funcBlock(0);
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index 1d4e482bf4..425714ea34 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -31,10 +31,10 @@ DECLARE_SINGLETON(Graphics::CursorManager);
namespace Graphics {
CursorManager::~CursorManager() {
- for (int i = 0; i < _cursorStack.size(); ++i)
+ for (Common::Stack<Cursor *>::size_type i = 0; i < _cursorStack.size(); ++i)
delete _cursorStack[i];
_cursorStack.clear();
- for (int i = 0; i < _cursorPaletteStack.size(); ++i)
+ for (Common::Stack<Palette *>::size_type i = 0; i < _cursorPaletteStack.size(); ++i)
delete _cursorPaletteStack[i];
_cursorPaletteStack.clear();
}
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index e7f49e9b2a..4fa60bfe07 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -188,7 +188,7 @@ bool GuiManager::loadNewTheme(Common::String id, ThemeEngine::GraphicsMode gfx,
}
// refresh all dialogs
- for (int i = 0; i < _dialogStack.size(); ++i)
+ for (DialogStack::size_type i = 0; i < _dialogStack.size(); ++i)
_dialogStack[i]->reflowLayout();
// We need to redraw immediately. Otherwise
@@ -202,7 +202,6 @@ bool GuiManager::loadNewTheme(Common::String id, ThemeEngine::GraphicsMode gfx,
}
void GuiManager::redraw() {
- int i;
ThemeEngine::ShadingStyle shading;
if (_redrawStatus == kRedrawDisabled || _dialogStack.empty())
@@ -223,7 +222,7 @@ void GuiManager::redraw() {
_theme->clearAll();
_theme->openDialog(true, ThemeEngine::kShadingNone);
- for (i = 0; i < _dialogStack.size() - 1; i++)
+ for (DialogStack::size_type i = 0; i < _dialogStack.size() - 1; i++)
_dialogStack[i]->drawDialog();
_theme->finishBuffering();
@@ -515,7 +514,7 @@ void GuiManager::screenChange() {
_theme->refresh();
// refresh all dialogs
- for (int i = 0; i < _dialogStack.size(); ++i) {
+ for (DialogStack::size_type i = 0; i < _dialogStack.size(); ++i) {
_dialogStack[i]->reflowLayout();
}
// We need to redraw immediately. Otherwise