[Scummvm-cvs-logs] CVS: scummvm/common config-manager.cpp,1.15,1.16 list.h,1.11,1.12 map.h,1.21,1.22 str.h,1.19,1.20
Max Horn
fingolfin at users.sourceforge.net
Wed Feb 4 16:24:14 CET 2004
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6094/common
Modified Files:
config-manager.cpp list.h map.h str.h
Log Message:
renamed (Const)Iterator to (const_)iterator; changed size() to return an uint
Index: config-manager.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/config-manager.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- config-manager.cpp 6 Jan 2004 12:45:27 -0000 1.15
+++ config-manager.cpp 5 Feb 2004 00:19:54 -0000 1.16
@@ -171,7 +171,7 @@
if (!(cfg_file = fopen(_filename.c_str(), "w"))) {
warning("Unable to write configuration file: %s.\n", _filename.c_str());
} else {
- DomainMap::ConstIterator d;
+ DomainMap::const_iterator d;
// First write the global domains
for (d = _globalDomains.begin(); d != _globalDomains.end(); ++d) {
@@ -193,7 +193,7 @@
fprintf(file, "[%s]\n", name.c_str());
- Domain::ConstIterator x;
+ Domain::const_iterator x;
for (x = domain.begin(); x != domain.end(); ++x) {
const String &value = x->_value;
if (!value.isEmpty())
@@ -218,7 +218,7 @@
if (!_activeDomain.isEmpty() && _gameDomains[_activeDomain].contains(key))
return true;
- DomainMap::ConstIterator iter;
+ DomainMap::const_iterator iter;
for (iter = _globalDomains.begin(); iter != _globalDomains.end(); ++iter) {
if (iter->_value.contains(key))
return true;
@@ -273,7 +273,7 @@
if (!dom.isEmpty() && _gameDomains.contains(dom) && _gameDomains[dom].contains(key))
return _gameDomains[dom][key];
- DomainMap::ConstIterator iter;
+ DomainMap::const_iterator iter;
for (iter = _globalDomains.begin(); iter != _globalDomains.end(); ++iter) {
if (iter->_value.contains(key))
return iter->_value[key];
Index: list.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/list.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- list.h 6 Jan 2004 12:45:27 -0000 1.11
+++ list.h 5 Feb 2004 00:19:54 -0000 1.12
@@ -34,8 +34,8 @@
T *_data;
public:
- typedef T *Iterator;
- typedef const T *ConstIterator;
+ typedef T *iterator;
+ typedef const T *const_iterator;
public:
List<T>() : _capacity(0), _size(0), _data(0) {}
@@ -103,7 +103,7 @@
return *this;
}
- int size() const {
+ uint size() const {
return _size;
}
@@ -121,19 +121,19 @@
}
- Iterator begin() {
+ iterator begin() {
return _data;
}
- Iterator end() {
+ iterator end() {
return _data + _size;
}
- ConstIterator begin() const {
+ const_iterator begin() const {
return _data;
}
- ConstIterator end() const {
+ const_iterator end() const {
return _data + _size;
}
Index: map.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/map.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- map.h 6 Jan 2004 12:45:27 -0000 1.21
+++ map.h 5 Feb 2004 00:19:54 -0000 1.22
@@ -68,19 +68,19 @@
Map<Key, Value, Comparator> &operator =(const Map<Key, Value, Comparator> &map);
public:
- class ConstIterator {
+ class const_iterator {
friend class Map<Key, Value, Comparator>;
protected:
Node *_node;
- ConstIterator(Node *node) : _node(node) {}
+ const_iterator(Node *node) : _node(node) {}
public:
- ConstIterator() : _node(0) {}
+ const_iterator() : _node(0) {}
Node &operator *() { assert(_node != 0); return *_node; }
const Node &operator *() const { assert(_node != 0); return *_node; }
const Node *operator->() const { assert(_node != 0); return _node; }
- bool operator !=(const ConstIterator &iter) const { return _node != iter._node; }
+ bool operator !=(const const_iterator &iter) const { return _node != iter._node; }
void operator ++() {
if (!_node)
return;
@@ -203,17 +203,17 @@
merge(map._root);
}
- ConstIterator begin() const {
+ const_iterator begin() const {
Node *node = _root;
if (node) {
while (node->_left)
node = node->_left;
}
- return ConstIterator(node);
+ return const_iterator(node);
}
- ConstIterator end() const {
- return ConstIterator();
+ const_iterator end() const {
+ return const_iterator();
}
protected:
Index: str.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/str.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- str.h 6 Jan 2004 12:45:28 -0000 1.19
+++ str.h 5 Feb 2004 00:19:54 -0000 1.20
@@ -67,7 +67,7 @@
}
const char *c_str() const { return _str ? _str : ""; }
- int size() const { return _len; }
+ uint size() const { return _len; }
bool isEmpty() const { return (_len == 0); }
};
More information about the Scummvm-git-logs
mailing list