X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d775fa82354a1f8d5db87ad1d71ab00ef7d9123c..99d21c0e1f8d87570702c52dccd3ad698f0a0931:/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); \ };\ }