Update metadata.h

Replace type pronning by a simple memcpy operation.
pull/1941/head
Kim Kulling 2018-05-08 09:46:32 +02:00 committed by GitHub
parent 948cf4d3cc
commit 8d42b31e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -149,7 +149,8 @@ struct aiMetadata {
mValues[ i ].mType = rhs.mValues[ i ].mType; mValues[ i ].mType = rhs.mValues[ i ].mType;
switch ( rhs.mValues[ i ].mType ) { switch ( rhs.mValues[ i ].mType ) {
case AI_BOOL: case AI_BOOL:
mValues[ i ].mData = new bool( *(static_cast<bool*>( rhs.mValues[i].mData )) ); mValues[ i ].mData = new bool;
::memcpy( mValues[ i ].mData, rhs.mValues[ i ].mData, sizeof(bool) );
break; break;
case AI_INT32: { case AI_INT32: {
int32_t v; int32_t v;