MCPcopy Create free account
hub / github.com/crownengine/crown / parse_index_array

Function parse_index_array

src/resource/mesh_resource.cpp:217–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 static s32 parse_index_array(Array<u32> &output, const char *json)
218 {
219 TempAllocator4096 ta;
220 JsonArray indices(ta);
221 RETURN_IF_ERROR(sjson::parse_array(indices, json));
222
223 array::resize(output, array::size(indices));
224 for (u32 i = 0; i < array::size(indices); ++i) {
225 output[i] = RETURN_IF_ERROR(sjson::parse_int(indices[i]));
226 }
227
228 return 0;
229 }
230
231 s32 parse_nodes(Mesh &m, const char *sjson, CompileOptions &opts);
232

Callers 1

parse_indicesFunction · 0.85

Calls 4

parse_arrayFunction · 0.50
resizeFunction · 0.50
sizeFunction · 0.50
parse_intFunction · 0.50

Tested by

no test coverage detected