summaryrefslogtreecommitdiffstats
path: root/include/o3tl/enumarray.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-02 10:28:17 +0200
committerNoel Grandin <noel@peralex.com>2015-04-07 13:05:34 +0200
commit4906c243877681b4559b495c1dfb4dbf8c51cfb8 (patch)
tree7b813844ffa4325ce75dd765513d6a413c198384 /include/o3tl/enumarray.hxx
parentUpdated core (diff)
downloadcore-4906c243877681b4559b495c1dfb4dbf8c51cfb8.tar.gz
core-4906c243877681b4559b495c1dfb4dbf8c51cfb8.zip
convert SvtModuleOptions::EFactory to enum class
and fix issues in iterating through o3tl::enumarray Change-Id: Ia59ef9be44d8c92c2e406fa71aa92269578e26e3
Diffstat (limited to 'include/o3tl/enumarray.hxx')
-rw-r--r--include/o3tl/enumarray.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx
index 6bc3dff7a608..76fdec12f38b 100644
--- a/include/o3tl/enumarray.hxx
+++ b/include/o3tl/enumarray.hxx
@@ -67,8 +67,8 @@ public:
{ for (size_type i=0; i<=max_index; ++i) detail_values[i] = val; }
size_type size() const { return max_index + 1; }
- iterator begin() { return iterator(this, 0); }
- iterator end() { return iterator(this, size()); }
+ iterator begin() { return iterator(*this, 0); }
+ iterator end() { return iterator(*this, size()); }
//private:
V detail_values[max_index + 1];
@@ -89,6 +89,7 @@ public:
value_type &operator*() { return m_buf[static_cast<key_type>(m_pos)]; }
value_type *operator->() { return &(operator*()); }
self_type &operator++() { ++m_pos; return *this; }
+ bool operator!=(const self_type& other) { return &m_buf != &other.m_buf || m_pos != other.m_pos; }
};
}; // namespace o3tl