Update ColladaParser.cpp

Fix review findings.
pull/2820/head
Kim Kulling 2019-12-13 08:30:40 +01:00 committed by GitHub
parent 9ef2d7fb7d
commit 53bf442beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -438,13 +438,19 @@ void ColladaParser::ReadContributorInfo()
}
}
bool FindCommonKey(const char *collada_key, const MetaKeyPairVector &key_renaming, size_t &found_index) {
static bool FindCommonKey(const char *collada_key, const MetaKeyPairVector &key_renaming, size_t &found_index) {
found_index = 9999999u;
if ( nullptr == collada_key ) {
return false;
}
for (size_t i = 0; i < key_renaming.size(); ++i) {
if (strcmp(key_renaming[i].first, collada_key) == 0) {
if (strncmp(key_renaming[i].first, collada_key, strlen(collada_key)) == 0) {
found_index = i;
return true;
}
}
return false;
}