Fixes compiling for me with g++ (GCC) 4.1.2 20061007 (prerelease) (Debian 4.1.1-16) on amd64.

svn-id: r24298
This commit is contained in:
Johannes Schickel 2006-10-13 20:18:27 +00:00
parent 429cdfb131
commit d65e7826fd
2 changed files with 10 additions and 20 deletions

View File

@ -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;
}

View File

@ -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;
}