Add wxVector::assign().
Closes #14703. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -541,6 +541,7 @@ All:
|
|||||||
- Fix posting large amounts of data in wxHTTP (Platonides).
|
- Fix posting large amounts of data in wxHTTP (Platonides).
|
||||||
- Add wxFile::ReadAll() for consistency with wxFFile.
|
- Add wxFile::ReadAll() for consistency with wxFFile.
|
||||||
- Add wxDateTime::DiffAsDateSpan() and wxDateSpan::GetTotalMonths() (jonasr).
|
- Add wxDateTime::DiffAsDateSpan() and wxDateSpan::GetTotalMonths() (jonasr).
|
||||||
|
- Add wxVector::assign() (Jonas Rydberg).
|
||||||
- Added Nepali translation (Him Prasad Gautam).
|
- Added Nepali translation (Him Prasad Gautam).
|
||||||
|
|
||||||
All (GUI):
|
All (GUI):
|
||||||
|
@@ -205,6 +205,14 @@ public:
|
|||||||
clear();
|
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)
|
void swap(wxVector& v)
|
||||||
{
|
{
|
||||||
wxSwap(m_size, v.m_size);
|
wxSwap(m_size, v.m_size);
|
||||||
|
@@ -61,6 +61,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
~wxVector();
|
~wxVector();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Resizes the vector to @a n and assigns @a v to all elements.
|
||||||
|
|
||||||
|
@see resize()
|
||||||
|
|
||||||
|
@since 2.9.5
|
||||||
|
*/
|
||||||
|
void assign(size_type n, const value_type& v);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns item at position @a idx.
|
Returns item at position @a idx.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user