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

Method GetPtr

engine/dlib/src/dmsdk/dlib/object_pool.h:213–219  ·  view source on GitHub ↗

* Get object pointer from logical index * @name GetPtr * @param index [type: uint32_t] index of the object * @return object [type: T*] a pointer to the object. Null if the logical index wasn't valid */

Source from the content-addressed store, hash-verified

211 * @return object [type: T*] a pointer to the object. Null if the logical index wasn't valid
212 */
213 T* GetPtr(uint32_t index)
214 {
215 Entry* e = &m_Entries[index];
216 if (e->m_Physical >= m_Objects.Size())
217 return 0;
218 return &m_Objects[e->m_Physical];
219 }
220
221 /*#
222 * Set object from logical index

Callers 1

GetJobItemFunction · 0.80

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected