浏览代码

Update metadata.h

Replace type pronning by a simple memcpy operation.
Kim Kulling 7 年之前
父节点
当前提交
8d42b31e20
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      include/assimp/metadata.h

+ 2 - 1
include/assimp/metadata.h

@@ -149,7 +149,8 @@ struct aiMetadata {
             mValues[ i ].mType = rhs.mValues[ i ].mType;
             switch ( rhs.mValues[ i ].mType ) {
             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;
             case AI_INT32: {
                 int32_t v;