add wxVector(size_t size[, const value_type& value]) ctors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -169,6 +169,22 @@ public:
|
|||||||
|
|
||||||
wxVector() : m_size(0), m_capacity(0), m_values(NULL) {}
|
wxVector() : m_size(0), m_capacity(0), m_values(NULL) {}
|
||||||
|
|
||||||
|
wxVector(size_type size)
|
||||||
|
: m_size(0), m_capacity(0), m_values(NULL)
|
||||||
|
{
|
||||||
|
reserve(size);
|
||||||
|
for ( size_t n = 0; n < size; n++ )
|
||||||
|
push_back(value_type());
|
||||||
|
}
|
||||||
|
|
||||||
|
wxVector(size_type size, const value_type& v)
|
||||||
|
: m_size(0), m_capacity(0), m_values(NULL)
|
||||||
|
{
|
||||||
|
reserve(n);
|
||||||
|
for ( size_t n = 0; n < size; n++ )
|
||||||
|
push_back(v);
|
||||||
|
}
|
||||||
|
|
||||||
wxVector(const wxVector& c) : m_size(0), m_capacity(0), m_values(NULL)
|
wxVector(const wxVector& c) : m_size(0), m_capacity(0), m_values(NULL)
|
||||||
{
|
{
|
||||||
Copy(c);
|
Copy(c);
|
||||||
|
@@ -64,6 +64,18 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxVector();
|
wxVector();
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructor initializing the vector with the given number of
|
||||||
|
default-constructed objects.
|
||||||
|
*/
|
||||||
|
wxVector(size_type size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Constructor initializing the vector with the given number of
|
||||||
|
copies of the given object.
|
||||||
|
*/
|
||||||
|
wxVector(size_type size, const value_type& value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Copy onstructor.
|
Copy onstructor.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user