diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-02 09:36:37 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-02 11:15:01 +0100 |
commit | 1bea427d55ecf4a1914a6c404fc0f06a7bb044bd (patch) | |
tree | fafcaf5c07e122e75ade45be89bf13976aa5ca26 /sw/inc/ring.hxx | |
parent | 98ee936a114bdd78c304aac824508cd4fd9ce59a (diff) |
add rangeRing() for easier iteration
Change-Id: I0ef002c0c32c1435cbc62f954f98dc11c3f69945
Diffstat (limited to 'sw/inc/ring.hxx')
-rw-r--r-- | sw/inc/ring.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index e364be893822..33bc069bdfba 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -21,6 +21,7 @@ #include <swdllapi.h> #include <swtypes.hxx> +#include <utility> #include <boost/iterator/iterator_facade.hpp> #include <boost/intrusive/circular_list_algorithms.hpp> @@ -67,6 +68,10 @@ namespace sw iterator endRing(); const_iterator beginRing() const; const_iterator endRing() const; + std::pair<iterator, iterator> rangeRing() + { return std::make_pair(beginRing(), endRing()); } + std::pair<const_iterator, const_iterator> rangeRing() const + { return std::make_pair(beginRing(), endRing()); } sal_uInt32 numberOf() const { return algo::count(static_cast< const T* >(this)); } |