mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
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:
parent
cb331ffcb9
commit
c7fa14d69c
3 changed files with 19 additions and 3 deletions
|
|
@ -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>)
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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; \
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue