parent
b2ab3fa35e
commit
c1706d9bf8
|
@ -380,11 +380,14 @@ struct aiMetadata {
|
||||||
/// Check whether there is a metadata entry for the given key.
|
/// Check whether there is a metadata entry for the given key.
|
||||||
/// \param [in] Key - the key value value to check for.
|
/// \param [in] Key - the key value value to check for.
|
||||||
inline
|
inline
|
||||||
bool HasKey(const char* key)
|
bool HasKey(const char* key) {
|
||||||
{
|
if ( nullptr == key ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Search for the given key
|
// Search for the given key
|
||||||
for (unsigned int i = 0; i < mNumProperties; ++i) {
|
for (unsigned int i = 0; i < mNumProperties; ++i) {
|
||||||
if (strcmp(mKeys[i].C_Str(), key) == 0) {
|
if ( 0 == strncmp(mKeys[i].C_Str(), key, mKeys[i].length ) ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue