slightly improved

This commit is contained in:
Michele Caini
2017-08-24 16:14:48 +02:00
parent a1aa23ba2b
commit 3a265a53ad
2 changed files with 14 additions and 13 deletions

View File

@@ -59,7 +59,7 @@ public:
return direct.begin();
}
const_iterator_type begin() const noexcept {
const_iterator_type cbegin() const noexcept {
return direct.cbegin();
}
@@ -67,7 +67,7 @@ public:
return direct.end();
}
const_iterator_type end() const noexcept {
const_iterator_type cend() const noexcept {
return direct.cend();
}
@@ -176,8 +176,8 @@ public:
}
template<typename Comp>
const_iterator_type begin() const noexcept {
return Pool<Comp>::begin();
const_iterator_type cbegin() const noexcept {
return Pool<Comp>::cbegin();
}
template<typename Comp>
@@ -186,8 +186,8 @@ public:
}
template<typename Comp>
const_iterator_type end() const noexcept {
return Pool<Comp>::end();
const_iterator_type cend() const noexcept {
return Pool<Comp>::cend();
}
template<typename Comp>

View File

@@ -56,7 +56,8 @@ private:
}
ViewIterator & operator++() noexcept {
while(++begin != end && !valid());
++begin;
while(begin != end && !valid()) { ++begin; }
return *this;
}
@@ -157,20 +158,20 @@ public:
: pool{pool}
{}
const_iterator_type begin() const noexcept {
return pool.template begin<Type>();
const_iterator_type cbegin() const noexcept {
return pool.template cbegin<Type>();
}
iterator_type begin() noexcept {
return const_cast<const View *>(this)->begin();
return pool.template begin<Type>();
}
const_iterator_type end() const noexcept {
return pool.template end<Type>();
const_iterator_type cend() const noexcept {
return pool.template cend<Type>();
}
iterator_type end() noexcept {
return const_cast<const View *>(this)->end();
return pool.template end<Type>();
}
size_type size() const noexcept {