MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / ktxTexture1_constructCommon

Function ktxTexture1_constructCommon

lib/texture1.c:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40struct ktxTexture_vtblInt ktxTexture1_vtblInt;
41
42static KTX_error_code
43ktxTexture1_constructCommon(ktxTexture1* This)
44{
45 assert(This != NULL);
46
47 This->classId = ktxTexture1_c;
48 This->vtbl = &ktxTexture1_vtbl;
49 This->_protected->_vtbl = ktxTexture1_vtblInt;
50 This->_private = (ktxTexture1_private*)malloc(sizeof(ktxTexture1_private));
51 if (This->_private == NULL) {
52 return KTX_OUT_OF_MEMORY;
53 }
54 memset(This->_private, 0, sizeof(*This->_private));
55
56 return KTX_SUCCESS;
57}
58
59/**
60 * @memberof ktxTexture1 @private

Callers 2

ktxTexture1_constructFunction · 0.85

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected