]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/stack.h
fixing warning and compile error against 10.4
[wxWidgets.git] / include / wx / stack.h
index 2500a114c609de25f6c939dc9c27088789df424b..835b736a6361d9fa0b47da0490217d44f8d99f9a 100644 (file)
 
 #include "wx/vector.h"
 
 
 #include "wx/vector.h"
 
-#define WX_DECLARE_STACK(obj, cls)\
-class cls : public wxVectorBase\
+#define WX_DECLARE_STACK(obj, cls) \
+class cls : public wxVector<obj> \
 {\
 {\
-    WX_DECLARE_VECTORBASE(obj, cls);\
 public:\
     void push(const obj& o)\
     {\
 public:\
     void push(const obj& o)\
     {\
-        bool rc = Alloc(size() + 1);\
-        wxASSERT(rc);\
-        Append(new obj(o));\
+        push_back(o); \
     };\
 \
     void pop()\
     {\
     };\
 \
     void pop()\
     {\
-        RemoveAt(size() - 1);\
+        pop_back(); \
     };\
 \
     obj& top()\
     {\
     };\
 \
     obj& top()\
     {\
-        return *(obj *) GetItem(size() - 1);\
+        return at(size() - 1);\
     };\
     const obj& top() const\
     {\
     };\
     const obj& top() const\
     {\
-        return *(obj *) GetItem(size() - 1);\
+        return at(size() - 1); \
     };\
 }
 
     };\
 }