From a772eb4fd43be84d756fb972049a4598b6a88f01 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 16 Jul 2014 11:35:34 +0000 Subject: [PATCH] base: remove unneeded operators in class array. --- src/lol/base/array.h | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/lol/base/array.h b/src/lol/base/array.h index 9b42b4c2..c6f9395e 100644 --- a/src/lol/base/array.h +++ b/src/lol/base/array.h @@ -145,38 +145,6 @@ public: return m_data[n]; } - inline element_t& operator[](uint32_t n) - { - /* Allow array[0] even if size is zero so that people can - * always use &array[0] to get a pointer to the data. */ - ASSERT(n >= 0); - ASSERT((uint32_t)n < (uint32_t)m_count || (!n && !m_count)); - return m_data[n]; - } - - inline element_t const& operator[](uint32_t n) const - { - ASSERT(n >= 0); - ASSERT(n < m_count || (!n && !m_count)); - return m_data[n]; - } - - inline element_t& operator[](uint64_t n) - { - /* Allow array[0] even if size is zero so that people can - * always use &array[0] to get a pointer to the data. */ - ASSERT(n >= 0); - ASSERT((uint64_t)n < (uint64_t)m_count || (!n && !m_count)); - return m_data[n]; - } - - inline element_t const& operator[](uint64_t n) const - { - ASSERT(n >= 0); - ASSERT(n < m_count || (!n && !m_count)); - return m_data[n]; - } - inline element_t& Last() { ASSERT(m_count > 0);