From 7caad280d1c58bdb7acc502c4526a0c8fb0d223e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 21 Apr 2009 17:02:09 +0000 Subject: COMMON: Removed copy constructors / assignment operators in cases where they are identical to the automatically generated ones. Also removed a pointless 'explicit' svn-id: r40049 --- common/queue.h | 9 ++------- common/rect.h | 4 +--- common/stack.h | 7 ++----- 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'common') diff --git a/common/queue.h b/common/queue.h index be6df0148a..cfe7f4e596 100644 --- a/common/queue.h +++ b/common/queue.h @@ -35,18 +35,13 @@ namespace Common { */ template class Queue { -public: - typedef T value_type; +//public: +// typedef T value_type; public: Queue() : _impl() {} Queue(const Queue &queue) : _impl(queue._impl) {} - Queue &operator=(const Queue &queue) { - _impl = queue._impl; - return *this; - } - bool empty() const { return _impl.empty(); } diff --git a/common/rect.h b/common/rect.h index a0ccd07f90..18cc4e56c3 100644 --- a/common/rect.h +++ b/common/rect.h @@ -40,9 +40,7 @@ struct Point { int16 y; //!< The vertical part of the point Point() : x(0), y(0) {} - Point(const Point &p) : x(p.x), y(p.y) {} - explicit Point(int16 x1, int16 y1) : x(x1), y(y1) {} - Point & operator=(const Point & p) { x = p.x; y = p.y; return *this; }; + Point(int16 x1, int16 y1) : x(x1), y(y1) {} bool operator==(const Point & p) const { return x == p.x && y == p.y; }; bool operator!=(const Point & p) const { return x != p.x || y != p.y; }; diff --git a/common/stack.h b/common/stack.h index e20e81028d..be6f1b8d10 100644 --- a/common/stack.h +++ b/common/stack.h @@ -83,16 +83,13 @@ public: */ template class Stack { -protected: +private: Array _stack; + public: Stack() {} Stack(const Array &stackContent) : _stack(stackContent) {} - Stack& operator=(const Stack &st) { - _stack = st._stack; - return *this; - } bool empty() const { return _stack.empty(); } -- cgit v1.2.3