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

Function ValidateBuffer

engine/dlib/src/dlib/buffer.cpp:236–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234 }
235
236 static Result ValidateBuffer(Buffer* buffer)
237 {
238 if (!buffer) {
239 return RESULT_BUFFER_INVALID;
240 }
241
242 // Check guard
243 uint8_t* ptr = (uint8_t*)buffer->m_Data + (buffer->m_Count * buffer->m_Stride);
244 if (!ValidateGuard(ptr)) {
245 return RESULT_GUARD_INVALID;
246 }
247 return RESULT_OK;
248 }
249
250 Result ValidateBuffer(HBuffer hbuffer)
251 {

Callers 7

IsBufferValidFunction · 0.85
CloneFunction · 0.85
GetStreamFunction · 0.85
GetBytesFunction · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
TEST_PFunction · 0.85

Calls 2

ValidateGuardFunction · 0.85
GetMethod · 0.45

Tested by 3

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_PFunction · 0.68