MCPcopy Create free account
hub / github.com/defold/defold / GetTypeFromExtensionHash

Function GetTypeFromExtensionHash

engine/resource/src/resource.cpp:1341–1355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1339}
1340
1341Result GetTypeFromExtensionHash(HFactory factory, dmhash_t extension_hash, HResourceType* type)
1342{
1343 assert(type);
1344
1345 ResourceType* resource_type = FindResourceTypeByHash(factory, extension_hash);
1346 if (resource_type)
1347 {
1348 *type = resource_type;
1349 return RESULT_OK;
1350 }
1351 else
1352 {
1353 return RESULT_UNKNOWN_RESOURCE_TYPE;
1354 }
1355}
1356
1357Result GetTypeFromExtension(HFactory factory, const char* extension, HResourceType* type)
1358{

Callers 2

GetTypeFromExtensionFunction · 0.85

Calls 2

FindResourceTypeByHashFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected