X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01871bf642aa91f0150285fa71e18151721de8e0..e10972f6c1436a6dcd5427b4e3913bb0f398e045:/include/wx/vector.h diff --git a/include/wx/vector.h b/include/wx/vector.h index 8cf76d9ff6..d558e774e6 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -205,6 +205,14 @@ public: clear(); } + void assign(size_type p_size, const value_type& v) + { + clear(); + reserve(p_size); + for ( size_t n = 0; n < p_size; n++ ) + push_back(v); + } + void swap(wxVector& v) { wxSwap(m_size, v.m_size); @@ -457,7 +465,7 @@ namespace wxPrivate template struct wxVectorComparator { - static int wxCMPFUNC_CONV + static int Compare(const void* pitem1, const void* pitem2, const void* ) { const T& item1 = *reinterpret_cast(pitem1);