Skip to content

Commit 01bd959

Browse files
committed
Merge pull request #279 from 1dayac/master
Default ctor for Matrix return 0x0 matrix
2 parents 7a26fae + f3dea07 commit 01bd959

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inst/include/Rcpp/vector/Matrix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Matrix : public Vector<RTYPE, StoragePolicy>, public MatrixBase<RTYPE, tru
4444
typedef typename VECTOR::Proxy Proxy ;
4545
typedef typename VECTOR::const_Proxy const_Proxy ;
4646

47-
Matrix() : VECTOR() {}
47+
Matrix() : VECTOR(Dimension(0, 0)), nrows(0) {}
4848

4949
Matrix(SEXP x) : VECTOR( r_cast<RTYPE>( x ) ), nrows( VECTOR::dims()[0] ) {}
5050

@@ -53,7 +53,7 @@ class Matrix : public Vector<RTYPE, StoragePolicy>, public MatrixBase<RTYPE, tru
5353
VECTOR::init() ;
5454
}
5555
Matrix( const int& nrows_, const int& ncols) : VECTOR( Dimension( nrows_, ncols ) ),
56-
nrows(nrows_)
56+
nrows(nrows_)
5757
{}
5858

5959
template <typename Iterator>

0 commit comments

Comments
 (0)