From 1bcdbbd3f8c511e3cef5faa47c3c9c99a6caaea5 Mon Sep 17 00:00:00 2001 From: stephena Date: Sun, 15 Apr 2012 17:04:53 +0000 Subject: [PATCH] Removed redundant code in Array class. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2441 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/common/Array.hxx | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/common/Array.hxx b/src/common/Array.hxx index 5475d8178..a33834ad5 100644 --- a/src/common/Array.hxx +++ b/src/common/Array.hxx @@ -71,15 +71,6 @@ class Array _data[_size++] = array._data[i]; } - void push_back_unique(const T& element) - { - if(!contains(element)) - { - ensureCapacity(_size + 1); - _data[_size++] = element; - } - } - void insert_at(int idx, const T& element) { assert(idx >= 0 && idx <= _size); @@ -171,15 +162,6 @@ class Array return _data + _size; } - bool contains(const T &key) const - { - for (const_iterator i = begin(); i != end(); ++i) { - if (*i == key) - return true; - } - return false; - } - protected: void ensureCapacity(int new_len) {