X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2985da8315e73dcf77872d7abc03d7b00cc484c..b0996c3da00677389854e5afbcef499e7aa1654b:/include/wx/stack.h diff --git a/include/wx/stack.h b/include/wx/stack.h index 53f5121c2c..835b736a63 100644 --- a/include/wx/stack.h +++ b/include/wx/stack.h @@ -13,32 +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)\ {\ - if ( !Alloc(size() + 1) )\ - {\ - wxFAIL_MSG(_T("failed to extend stack"));\ - }\ - 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); \ };\ }