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

Function FindMetaDataItem

engine/dlib/src/dlib/buffer.cpp:602–610  ·  view source on GitHub ↗

Returns a pointer to the metadata item or 0 if not found. Assumes buffer is valid.

Source from the content-addressed store, hash-verified

600
601 // Returns a pointer to the metadata item or 0 if not found. Assumes buffer is valid.
602 static Buffer::MetaData* FindMetaDataItem(Buffer* buffer, dmhash_t name_hash) {
603 dmArray<Buffer::MetaData*>& arr = buffer->m_MetaDataArray;
604 for (uint32_t i=0; i<arr.Size(); i++) {
605 if (arr[i]->m_Name == name_hash) {
606 return arr[i];
607 }
608 }
609 return 0; // nothing found
610 }
611
612
613 Result GetMetaData(HBuffer hbuffer, dmhash_t name_hash, void** data, uint32_t* count, ValueType* type) {

Callers 2

GetMetaDataFunction · 0.85
SetMetaDataFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected