Fix gcc warning sizeof on array function parameter src will return size of float (*)[3]

This commit is contained in:
Pan7 2016-08-25 17:47:34 +02:00
parent 8557f1820f
commit 70b90a60c7
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,11 @@ ID_INLINE mat3_t::mat3_t() {
}
ID_INLINE mat3_t::mat3_t( float src[ 3 ][ 3 ] ) {
memcpy( mat, src, sizeof( src ) );
for( unsigned int i = 0; i < 3; i++ ) {
mat[i].x = src[i][0];
mat[i].y = src[i][1];
mat[i].z = src[i][2];
}
}
ID_INLINE mat3_t::mat3_t( idVec3 const &x, idVec3 const &y, idVec3 const &z ) {