Arrays - Bug fix on resize( )
Default constructor was not being called for new items.
This commit is contained in:
parent
9f666eea49
commit
1ce16d63cb
1 changed files with 2 additions and 2 deletions
|
@ -204,7 +204,7 @@ inline T_Array< T >& T_Array< T >::resize(
|
|||
{
|
||||
if ( size > size_ ) {
|
||||
ensureCapacity( size );
|
||||
for ( auto i = size_ ; i < size_ ; i ++ ) {
|
||||
for ( auto i = size_ ; i < size ; i ++ ) {
|
||||
::new ( reinterpret_cast< char* >( &data_[ i ] ) ) T( );
|
||||
}
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ inline T_Array< T >& T_Array< T >::resize(
|
|||
{
|
||||
if ( size > size_ ) {
|
||||
ensureCapacity( size );
|
||||
for ( auto i = size_ ; i < size_ ; i ++ ) {
|
||||
for ( auto i = size_ ; i < size ; i ++ ) {
|
||||
::new ( reinterpret_cast< char* >( &data_[ i ] ) ) T( value );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue