]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynarray.h
Fixed bug #1022383: 'several ComboBoxes appear selected'
[wxWidgets.git] / include / wx / dynarray.h
index b24d807b9c74607c4bfc75df5b5cf69edf187591..2a0aabda647ace0e6bb488a4db60dce8a0e15dfb 100644 (file)
@@ -320,8 +320,9 @@ public:                                                               \
 // common declaration used by both _WX_DEFINE_TYPEARRAY and
 // _WX_DEFINE_TYPEARRAY_PTR
 #define  _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, ptrop)  \
-wxCOMPILE_TIME_ASSERT(sizeof(T) <= sizeof(base::base_type),           \
-                       TypeTooBigToBeStoredIn##base);                 \
+wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type),          \
+                       TypeTooBigToBeStoredIn##base,                  \
+                       name);                                         \
 typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2);         \
 classexp name : public base                                           \
 {                                                                     \
@@ -399,11 +400,11 @@ public:                                                               \
     reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }            \
     reference operator*() const { return *m_ptr; }                    \
     ptrop                                                             \
-    itor operator++() { --m_ptr; return *this; }                      \
-    itor operator++(int)                                              \
+    itor& operator++() { --m_ptr; return *this; }                     \
+    const itor operator++(int)                                        \
       { reverse_iterator tmp = *this; --m_ptr; return tmp; }          \
-    itor operator--() { ++m_ptr; return *this; }                      \
-    itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }   \
+    itor& operator--() { ++m_ptr; return *this; }                     \
+    const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
     bool operator ==(const itor& it) { return m_ptr == it.m_ptr; }    \
     bool operator !=(const itor& it) { return m_ptr != it.m_ptr; }    \
   };                                                                  \
@@ -432,11 +433,11 @@ public:                                                               \
     const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }\
     reference operator*() const { return *m_ptr; }                    \
     ptrop                                                             \
-    itor operator++() { --m_ptr; return *this; }                      \
-    itor operator++(int)                                              \
+    itor& operator++() { --m_ptr; return *this; }                     \
+    const itor operator++(int)                                        \
       { itor tmp = *this; --m_ptr; return tmp; }                      \
-    itor operator--() { ++m_ptr; return *this; }                      \
-    itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }   \
+    itor& operator--() { ++m_ptr; return *this; }                     \
+    const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
     bool operator ==(const itor& it) { return m_ptr == it.m_ptr; }    \
     bool operator !=(const itor& it) { return m_ptr != it.m_ptr; }    \
   };                                                                  \
@@ -495,8 +496,9 @@ public:                                                               \
 // ----------------------------------------------------------------------------
 
 #define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classexp, comptype)\
-wxCOMPILE_TIME_ASSERT(sizeof(T) <= sizeof(base::base_type),           \
-                      TypeTooBigToBeStoredInSorted##base);            \
+wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type),          \
+                       TypeTooBigToBeStoredInSorted##base,            \
+                       name);                                         \
 classexp name : public base                                           \
 {                                                                     \
   typedef comptype SCMPFUNC;                                          \