aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2006-10-13 20:18:27 +0000
committerJohannes Schickel2006-10-13 20:18:27 +0000
commitd65e7826fd0c374757d8f897d2ffa4385b49eb62 (patch)
treeec9b06298711fde5f466f3f62a28b583e82894cb /common
parent429cdfb131726036ba45148e120e075425873c40 (diff)
downloadscummvm-rg350-d65e7826fd0c374757d8f897d2ffa4385b49eb62.tar.gz
scummvm-rg350-d65e7826fd0c374757d8f897d2ffa4385b49eb62.tar.bz2
scummvm-rg350-d65e7826fd0c374757d8f897d2ffa4385b49eb62.zip
Fixes compiling for me with g++ (GCC) 4.1.2 20061007 (prerelease) (Debian 4.1.1-16) on amd64.
svn-id: r24298
Diffstat (limited to 'common')
-rw-r--r--common/array.h11
-rw-r--r--common/list.h19
2 files changed, 10 insertions, 20 deletions
diff --git a/common/array.h b/common/array.h
index 6493a9bda7..38df8eadbb 100644
--- a/common/array.h
+++ b/common/array.h
@@ -39,8 +39,8 @@ public:
typedef const T *const_iterator;
public:
- Array<T>() : _capacity(0), _size(0), _data(0) {}
- Array<T>(const Array<T>& array) : _capacity(0), _size(0), _data(0) {
+ Array() : _capacity(0), _size(0), _data(0) {}
+ Array(const Array<T>& array) : _capacity(0), _size(0), _data(0) {
_size = array._size;
_capacity = _size + 32;
_data = new T[_capacity];
@@ -48,12 +48,7 @@ public:
_data[i] = array._data[i];
}
-#ifdef __SYMBIAN32__
- ~Array()
-#else
- ~Array<T>()
-#endif
- {
+ ~Array() {
if (_data)
delete [] _data;
}
diff --git a/common/list.h b/common/list.h
index 38ba9b143b..057bae4342 100644
--- a/common/list.h
+++ b/common/list.h
@@ -47,7 +47,7 @@ public:
struct Node : public NodeBase {
T2 _data;
- Node<T2>(const T2 &x) : _data(x) {}
+ Node(const T2 &x) : _data(x) {}
};
template <class T2>
@@ -56,13 +56,13 @@ public:
NodeBase *_node;
#if !defined (PALMOS_MODE) && !defined (__WINSCW__)
- explicit Iterator<T2>(NodeBase *node) : _node(node) {}
+ explicit Iterator(NodeBase *node) : _node(node) {}
#else
- Iterator<T2>(NodeBase *node) : _node(node) {}
+ Iterator(NodeBase *node) : _node(node) {}
#endif
public:
- Iterator<T2>() : _node(0) {}
+ Iterator() : _node(0) {}
// Prefix inc
Iterator<T2> &operator++() {
@@ -116,12 +116,12 @@ public:
typedef Iterator<const T> const_iterator;
public:
- List<T>() {
+ List() {
_anchor = new NodeBase;
_anchor->_prev = _anchor;
_anchor->_next = _anchor;
}
- List<T>(const List<T>& list) {
+ List(const List<T>& list) {
_anchor = new NodeBase;
_anchor->_prev = _anchor;
_anchor->_next = _anchor;
@@ -129,12 +129,7 @@ public:
insert(begin(), list.begin(), list.end());
}
-#ifndef __SYMBIAN32__
- ~List<T>()
-#else
- ~List()
-#endif
- {
+ ~List() {
clear();
delete _anchor;
}