Browse Source

Fixed build warnings on MSVC14 x64 in the LWO format sources.

Jared Mulconry 9 years ago
parent
commit
2c93e29dcc
2 changed files with 4 additions and 4 deletions
  1. 3 3
      code/LWOAnimation.cpp
  2. 1 1
      code/LWOLoader.cpp

+ 3 - 3
code/LWOAnimation.cpp

@@ -565,7 +565,7 @@ void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int flags /*= 0
         std::vector<aiVectorKey> keys;
         GetKeys(keys,trans_x,trans_y,trans_z,flags);
 
-        anim->mPositionKeys = new aiVectorKey[ anim->mNumPositionKeys = keys.size() ];
+        anim->mPositionKeys = new aiVectorKey[ anim->mNumPositionKeys = static_cast<unsigned int>(keys.size()) ];
         std::copy(keys.begin(),keys.end(),anim->mPositionKeys);
     }
 
@@ -574,7 +574,7 @@ void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int flags /*= 0
         std::vector<aiVectorKey> keys;
         GetKeys(keys,rotat_x,rotat_y,rotat_z,flags);
 
-        anim->mRotationKeys = new aiQuatKey[ anim->mNumRotationKeys = keys.size() ];
+        anim->mRotationKeys = new aiQuatKey[ anim->mNumRotationKeys = static_cast<unsigned int>(keys.size()) ];
 
         // convert heading, pitch, bank to quaternion
         // mValue.x=Heading=Rot(Y), mValue.y=Pitch=Rot(X), mValue.z=Bank=Rot(Z)
@@ -594,7 +594,7 @@ void AnimResolver::ExtractAnimChannel(aiNodeAnim** out, unsigned int flags /*= 0
         std::vector<aiVectorKey> keys;
         GetKeys(keys,scale_x,scale_y,scale_z,flags);
 
-        anim->mScalingKeys = new aiVectorKey[ anim->mNumScalingKeys = keys.size() ];
+        anim->mScalingKeys = new aiVectorKey[ anim->mNumScalingKeys = static_cast<unsigned int>(keys.size()) ];
         std::copy(keys.begin(),keys.end(),anim->mScalingKeys);
     }
 }

+ 1 - 1
code/LWOLoader.cpp

@@ -426,7 +426,7 @@ void LWOImporter::InternReadFile( const std::string& pFile,
         }
 
         // Generate nodes to render the mesh. Store the source layer in the mParent member of the nodes
-        unsigned int num = apcMeshes.size() - meshStart;
+        unsigned int num = static_cast<unsigned int>(apcMeshes.size() - meshStart);
         if (layer.mName != "<LWODefault>" || num > 0) {
             aiNode* pcNode = new aiNode();
             apcNodes[layer.mIndex] = pcNode;