Fixed build warnings on MSVC14 x64 in the scene combiner.

pull/1083/head
Jared Mulconry 2016-11-20 14:07:24 +11:00
parent 439b4861c8
commit ff31abf57c
1 changed files with 5 additions and 5 deletions

View File

@ -90,7 +90,7 @@ void SceneCombiner::AddNodeHashes(aiNode* node, std::set<unsigned int>& 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<uint32_t>(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<SceneHelper>& input, unsigned int cur)
{
const unsigned int hash = SuperFastHash(name.data, name.length);
const unsigned int hash = SuperFastHash(name.data, static_cast<uint32_t>(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<SceneHelper>& 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<uint32_t>(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<uint32_t>(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<int>(src.size()-1); n >= 0 ;--n ) /* !!! important !!! */
{
SceneHelper* cur = &src[n];
aiNode* node;