------------------------------------------------------------------------------------------------
| 449 | |
| 450 | // ------------------------------------------------------------------------------------------------ |
| 451 | aiReturn aiMaterial::RemoveProperty(const char *pKey, unsigned int type, unsigned int index) { |
| 452 | ai_assert(nullptr != pKey); |
| 453 | |
| 454 | for (unsigned int i = 0; i < mNumProperties; ++i) { |
| 455 | aiMaterialProperty *prop = mProperties[i]; |
| 456 | |
| 457 | if (prop && !strcmp(prop->mKey.data, pKey) && |
| 458 | prop->mSemantic == type && prop->mIndex == index) { |
| 459 | // Delete this entry |
| 460 | delete mProperties[i]; |
| 461 | |
| 462 | // collapse the array behind --. |
| 463 | --mNumProperties; |
| 464 | for (unsigned int a = i; a < mNumProperties; ++a) { |
| 465 | mProperties[a] = mProperties[a + 1]; |
| 466 | } |
| 467 | return AI_SUCCESS; |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | return AI_FAILURE; |
| 472 | } |
| 473 | |
| 474 | // ------------------------------------------------------------------------------------------------ |
| 475 | aiReturn aiMaterial::AddBinaryProperty(const void *pInput, |
no outgoing calls
no test coverage detected