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