Core: Fixed STL iterators for sorted maps

git-svn-id: svn://ultimatepp.org/upp/trunk@7123 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-04-01 19:26:50 +00:00
parent 8c52909c22
commit 324f0ceb60
3 changed files with 19 additions and 3 deletions

View file

@ -652,7 +652,7 @@ public:
ConstIterator End() const { return B::value.data.End(); }
ConstIterator GetIter(int pos) const { return B::value.data.GetIter(pos); }
STL_MAP_COMPATIBILITY(SortedVectorMap<K _cm_ T _cm_ Less>)
STL_SORTED_MAP_COMPATIBILITY(SortedVectorMap<K _cm_ T _cm_ Less>)
};
template <class T>
@ -729,6 +729,6 @@ public:
ConstIterator End() const { return B::value.data.End(); }
ConstIterator GetIter(int pos) const { return B::value.data.GetIter(pos); }
STL_MAP_COMPATIBILITY(SortedArrayMap<K _cm_ T _cm_ HashFn>)
STL_SORTED_MAP_COMPATIBILITY(SortedArrayMap<K _cm_ T _cm_ HashFn>)
};

View file

@ -340,6 +340,22 @@ public:
iterator begin() { return B::Begin(); } \
iterator end() { return B::End(); } \
#define STL_SORTED_MAP_COMPATIBILITY(C) \
typedef T value_type; \
typedef ConstIterator const_iterator; \
typedef const T& const_reference; \
typedef int size_type; \
typedef int difference_type; \
const_iterator begin() const { return Begin(); } \
const_iterator end() const { return End(); } \
void clear() { B::Clear(); } \
size_type size() const { return B::GetCount(); } \
typedef Iterator iterator; \
typedef T& reference; \
bool empty() const { return B::GetCount() == 0; } \
iterator begin() { return Begin(); } \
iterator end() { return End(); } \
#define STL_VECTOR_COMPATIBILITY(C) \
typedef T value_type; \
typedef ConstIterator const_iterator; \

View file

@ -1,7 +1,7 @@
#ifndef _Painter_icpp_init_stub
#define _Painter_icpp_init_stub
#include "Draw/init"
#define BLITZ_INDEX__ Fcf1e6c345d9100ecf96ca5bd96de6ce3
#define BLITZ_INDEX__ Fb59219fc3bf1aed0b7289197596b0ec3
#include "PaintPainting.icpp"
#undef BLITZ_INDEX__
#endif