[Scummvm-cvs-logs] CVS: scummvm/gui EditTextWidget.cpp,1.24,1.25 EditTextWidget.h,1.13,1.14 ListWidget.cpp,1.34,1.35 ListWidget.h,1.20,1.21 PopUpWidget.cpp,1.28,1.29 TabWidget.cpp,1.10,1.11 browser.h,1.12,1.13 chooser.h,1.10,1.11 launcher.cpp,1.84,1.85 message.h,1.12,1.13 newgui.cpp,1.75,1.76
Max Horn
fingolfin at users.sourceforge.net
Wed Feb 4 16:23:15 CET 2004
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6094/gui
Modified Files:
EditTextWidget.cpp EditTextWidget.h ListWidget.cpp
ListWidget.h PopUpWidget.cpp TabWidget.cpp browser.h chooser.h
launcher.cpp message.h newgui.cpp
Log Message:
renamed (Const)Iterator to (const_)iterator; changed size() to return an uint
Index: EditTextWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- EditTextWidget.cpp 6 Jan 2004 12:45:28 -0000 1.24
+++ EditTextWidget.cpp 5 Feb 2004 00:19:54 -0000 1.25
@@ -59,7 +59,7 @@
x += _labelOffset;
int width = 0;
- int i;
+ uint i;
for (i = 0; i < _label.size(); ++i) {
width += gui->getCharWidth(_label[i]);
@@ -112,7 +112,7 @@
}
break;
case 256 + 19: // right arrow
- if (_pos < _label.size()) {
+ if (_pos < (int)_label.size()) {
_pos++;
dirty = adjustOffset();
}
Index: EditTextWidget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/EditTextWidget.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- EditTextWidget.h 6 Jan 2004 12:45:28 -0000 1.13
+++ EditTextWidget.h 5 Feb 2004 00:19:54 -0000 1.14
@@ -23,7 +23,6 @@
#include "gui/widget.h"
#include "common/str.h"
-#include "common/list.h"
namespace GUI {
Index: ListWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- ListWidget.cpp 26 Jan 2004 07:34:07 -0000 1.34
+++ ListWidget.cpp 5 Feb 2004 00:19:54 -0000 1.35
@@ -97,7 +97,7 @@
if (isEnabled()) {
int oldSelectedItem = _selectedItem;
_selectedItem = (y - 1) / kLineHeight + _currentPos;
- if (_selectedItem > _list.size() - 1)
+ if (_selectedItem > (int)_list.size() - 1)
_selectedItem = -1;
if (oldSelectedItem != _selectedItem) {
@@ -183,7 +183,7 @@
_selectedItem--;
break;
case 256+18: // down arrow
- if (_selectedItem < _list.size() - 1)
+ if (_selectedItem < (int)_list.size() - 1)
_selectedItem++;
break;
case 256+24: // pageup
@@ -193,7 +193,7 @@
break;
case 256+25: // pagedown
_selectedItem += _entriesPerPage - 1;
- if (_selectedItem >= _list.size() )
+ if (_selectedItem >= (int)_list.size() )
_selectedItem = _list.size() - 1;
break;
case 256+22: // home
Index: ListWidget.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ListWidget.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- ListWidget.h 6 Jan 2004 12:45:28 -0000 1.20
+++ ListWidget.h 5 Feb 2004 00:19:54 -0000 1.21
@@ -23,7 +23,6 @@
#include "gui/widget.h"
#include "common/str.h"
-#include "common/list.h"
namespace GUI {
Index: PopUpWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/PopUpWidget.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- PopUpWidget.cpp 6 Jan 2004 12:45:28 -0000 1.28
+++ PopUpWidget.cpp 5 Feb 2004 00:19:54 -0000 1.29
@@ -307,7 +307,7 @@
void PopUpWidget::setSelected(int item) {
// FIXME
if (item != _selectedItem) {
- if (item >= 0 && item < _entries.size()) {
+ if (item >= 0 && item < (int)_entries.size()) {
_selectedItem = item;
} else {
_selectedItem = -1;
Index: TabWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/TabWidget.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- TabWidget.cpp 6 Jan 2004 12:45:28 -0000 1.10
+++ TabWidget.cpp 5 Feb 2004 00:19:54 -0000 1.11
@@ -45,7 +45,7 @@
}
TabWidget::~TabWidget() {
- for (int i = 0; i < _tabs.size(); ++i) {
+ for (uint i = 0; i < _tabs.size(); ++i) {
delete _tabs[i].firstWidget;
_tabs[i].firstWidget = 0;
}
@@ -81,7 +81,7 @@
}
void TabWidget::setActiveTab(int tabID) {
- assert(0 <= tabID && tabID < _tabs.size());
+ assert(0 <= tabID && tabID < (int)_tabs.size());
if (_activeTab != tabID) {
// Exchange the widget lists, and switch to the new tab
if (_activeTab != -1)
@@ -101,7 +101,7 @@
x -= kTabLeftOffset;
if (x >= 0 && x % (_tabWidth + kTabSpacing) < _tabWidth) {
tabID = x / (_tabWidth + kTabSpacing);
- if (tabID >= _tabs.size())
+ if (tabID >= (int)_tabs.size())
tabID = -1;
}
@@ -126,7 +126,7 @@
// Iterate over all tabs and draw them
int i, x = _x + kTabLeftOffset;
- for (i = 0; i < _tabs.size(); ++i) {
+ for (i = 0; i < (int)_tabs.size(); ++i) {
NewGuiColor color = (i == _activeTab) ? gui->_color : gui->_shadowcolor;
int yOffset = (i == _activeTab) ? 0 : 2;
gui->box(x, _y + yOffset, _tabWidth, kTabHeight - yOffset, color, color);
Index: browser.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/browser.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- browser.h 1 Feb 2004 02:03:01 -0000 1.12
+++ browser.h 5 Feb 2004 00:19:54 -0000 1.13
@@ -21,9 +21,8 @@
#ifndef BROWSER_DIALOG_H
#define BROWSER_DIALOG_H
-#include "dialog.h"
+#include "gui/dialog.h"
#include "common/str.h"
-#include "common/list.h"
#ifdef MACOSX
#include <Carbon/Carbon.h>
Index: chooser.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/chooser.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- chooser.h 6 Jan 2004 12:45:28 -0000 1.10
+++ chooser.h 5 Feb 2004 00:19:54 -0000 1.11
@@ -22,7 +22,6 @@
#define CHOOSER_DIALOG_H
#include "common/str.h"
-#include "common/list.h"
#include "gui/dialog.h"
namespace GUI {
Index: launcher.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/launcher.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- launcher.cpp 6 Jan 2004 12:45:29 -0000 1.84
+++ launcher.cpp 5 Feb 2004 00:19:54 -0000 1.85
@@ -356,7 +356,7 @@
// Retrieve a list of all games defined in the config file
_domains.clear();
const ConfigManager::DomainMap &domains = ConfMan.getGameDomains();
- ConfigManager::DomainMap::ConstIterator iter = domains.begin();
+ ConfigManager::DomainMap::const_iterator iter = domains.begin();
for (iter = domains.begin(); iter != domains.end(); ++iter) {
String name(iter->_value.get("gameid"));
String description(iter->_value.get("description"));
@@ -417,14 +417,14 @@
} else {
// Display the candidates to the user and let her/him pick one
StringList list;
- for (idx = 0; idx < candidates.size(); idx++)
+ for (idx = 0; idx < (int)candidates.size(); idx++)
list.push_back(candidates[idx].description);
ChooserDialog dialog("Pick the game:");
dialog.setList(list);
idx = dialog.runModal();
}
- if (0 <= idx && idx < candidates.size()) {
+ if (0 <= idx && idx < (int)candidates.size()) {
DetectedGame result = candidates[idx];
// The auto detector or the user made a choice.
Index: message.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/message.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- message.h 6 Jan 2004 12:45:29 -0000 1.12
+++ message.h 5 Feb 2004 00:19:54 -0000 1.13
@@ -22,11 +22,7 @@
#define MESSAGE_DIALOG_H
#include "gui/dialog.h"
-
-namespace Common {
- class String;
- class StringList;
-}
+#include "common/str.h"
namespace GUI {
Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- newgui.cpp 26 Jan 2004 07:35:31 -0000 1.75
+++ newgui.cpp 5 Feb 2004 00:19:54 -0000 1.76
@@ -459,7 +459,7 @@
int NewGui::getStringWidth(const String &str) {
int space = 0;
- for (int i = 0; i < str.size(); ++i)
+ for (uint i = 0; i < str.size(); ++i)
space += getCharWidth(str[i]);
return space;
}
@@ -483,7 +483,7 @@
void NewGui::drawString(const String &s, int x, int y, int w, NewGuiColor color, int align, int deltax, bool useEllipsis) {
const int leftX = x, rightX = x + w;
- int i;
+ uint i;
int width = getStringWidth(s);
String str;
More information about the Scummvm-git-logs
mailing list