| 448 | } |
| 449 | |
| 450 | Result ValidateResourceType(HResourceType type) |
| 451 | { |
| 452 | // Dots not allowed in extension |
| 453 | if (strrchr(type->m_Extension, '.') != 0) |
| 454 | { |
| 455 | dmLogError("No '.' is allowed for the resource type '%s'", type->m_Extension); |
| 456 | return RESULT_INVAL; |
| 457 | } |
| 458 | |
| 459 | if (type->m_CreateFunction == 0 || type->m_DestroyFunction == 0) |
| 460 | { |
| 461 | dmLogError("Missing create or destroy function for resource type '%s'", type->m_Extension); |
| 462 | return RESULT_INVAL; |
| 463 | } |
| 464 | |
| 465 | return RESULT_OK; |
| 466 | } |
| 467 | |
| 468 | HResourceType FindResourceTypeByHash(HResourceFactory factory, dmhash_t extension_hash) |
| 469 | { |
no outgoing calls
no test coverage detected