From b1f8bee53327c3437d8e3093007b1e26dbe59dca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 12 Nov 2007 13:58:48 +0000 Subject: [PATCH] add std::vector-compatible ctors taking array size and array size and initial value for wxUSE_STL==1 too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dynarray.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 9ed4c10642..9bdd300ee7 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -120,6 +120,10 @@ classexp name : public std::vector \ public: \ typedef wxArray_SortFunction::CMPFUNC CMPFUNC; \ public: \ + name() : std::vector() { } \ + name(size_type n) : std::vector(n) { } \ + name(size_type n, const_reference v) : std::vector(n, v) { } \ + \ void Empty() { clear(); } \ void Clear() { clear(); } \ void Alloc(size_t uiSize) { reserve(uiSize); } \ @@ -282,6 +286,10 @@ typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \ classexp name : public base \ { \ public: \ + name() : base() { } \ + name(size_type n) : base(n) { } \ + name(size_type n, const_reference v) : base(n, v) { } \ + \ T& operator[](size_t uiIndex) const \ { return (T&)(base::operator[](uiIndex)); } \ T& Item(size_t uiIndex) const \ -- 2.50.0