From: Jared Mulconry Date: Sun, 20 Nov 2016 03:07:24 +0000 (+1100) Subject: Fixed build warnings on MSVC14 x64 in the scene combiner. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff31abf57c884d1cbe45b78f3b0b3189102a48ca;p=platform%2Fupstream%2Fassimp.git Fixed build warnings on MSVC14 x64 in the scene combiner. --- diff --git a/code/SceneCombiner.cpp b/code/SceneCombiner.cpp index e19741a..02c0719 100644 --- a/code/SceneCombiner.cpp +++ b/code/SceneCombiner.cpp @@ -90,7 +90,7 @@ void SceneCombiner::AddNodeHashes(aiNode* node, std::set& hashes) // Add node name to hashing set if it is non-empty - empty nodes are allowed // and they can't have any anims assigned so its absolutely safe to duplicate them. if (node->mName.length) { - hashes.insert( SuperFastHash(node->mName.data,node->mName.length) ); + hashes.insert( SuperFastHash(node->mName.data, static_cast(node->mName.length)) ); } // Process all children recursively @@ -114,7 +114,7 @@ void SceneCombiner::AddNodePrefixes(aiNode* node, const char* prefix, unsigned i // Search for matching names bool SceneCombiner::FindNameMatch(const aiString& name, std::vector& input, unsigned int cur) { - const unsigned int hash = SuperFastHash(name.data, name.length); + const unsigned int hash = SuperFastHash(name.data, static_cast(name.length)); // Check whether we find a positive match in one of the given sets for (unsigned int i = 0; i < input.size(); ++i) { @@ -132,7 +132,7 @@ void SceneCombiner::AddNodePrefixesChecked(aiNode* node, const char* prefix, uns std::vector& input, unsigned int cur) { ai_assert(NULL != prefix); - const unsigned int hash = SuperFastHash(node->mName.data,node->mName.length); + const unsigned int hash = SuperFastHash(node->mName.data, static_cast(node->mName.length)); // Check whether we find a positive match in one of the given sets for (unsigned int i = 0; i < input.size(); ++i) { @@ -323,7 +323,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master, for (unsigned int a = 0; a < src[i]->mNumAnimations;++a) { aiAnimation* anim = src[i]->mAnimations[a]; - src[i].hashes.insert(SuperFastHash(anim->mName.data,anim->mName.length)); + src[i].hashes.insert(SuperFastHash(anim->mName.data,static_cast(anim->mName.length))); } } } @@ -485,7 +485,7 @@ void SceneCombiner::MergeScenes(aiScene** _dest, aiScene* master, aiAnimation** ppAnims = dest->mAnimations = (dest->mNumAnimations ? new aiAnimation*[dest->mNumAnimations] : NULL); - for ( int n = src.size()-1; n >= 0 ;--n ) /* !!! important !!! */ + for ( int n = static_cast(src.size()-1); n >= 0 ;--n ) /* !!! important !!! */ { SceneHelper* cur = &src[n]; aiNode* node;