X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d775fa82354a1f8d5db87ad1d71ab00ef7d9123c..50ccc908dc4e6376de91edd7f74018898fd690b1:/include/wx/stack.h diff --git a/include/wx/stack.h b/include/wx/stack.h index 2500a114c6..835b736a63 100644 --- a/include/wx/stack.h +++ b/include/wx/stack.h @@ -13,30 +13,27 @@ #include "wx/vector.h" -#define WX_DECLARE_STACK(obj, cls)\ -class cls : public wxVectorBase\ +#define WX_DECLARE_STACK(obj, cls) \ +class cls : public wxVector \ {\ - WX_DECLARE_VECTORBASE(obj, cls);\ public:\ void push(const obj& o)\ {\ - bool rc = Alloc(size() + 1);\ - wxASSERT(rc);\ - Append(new obj(o));\ + push_back(o); \ };\ \ void pop()\ {\ - RemoveAt(size() - 1);\ + pop_back(); \ };\ \ obj& top()\ {\ - return *(obj *) GetItem(size() - 1);\ + return at(size() - 1);\ };\ const obj& top() const\ {\ - return *(obj *) GetItem(size() - 1);\ + return at(size() - 1); \ };\ }