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

Function parse_float_array

src/resource/mesh_resource.cpp:203–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201namespace mesh
202{
203 static s32 parse_float_array(Array<f32> &output, const char *json)
204 {
205 TempAllocator4096 ta;
206 JsonArray floats(ta);
207 RETURN_IF_ERROR(sjson::parse_array(floats, json));
208
209 array::resize(output, array::size(floats));
210 for (u32 i = 0; i < array::size(floats); ++i) {
211 output[i] = RETURN_IF_ERROR(sjson::parse_float(floats[i]));
212 }
213
214 return 0;
215 }
216
217 static s32 parse_index_array(Array<u32> &output, const char *json)
218 {

Callers 1

parse_geometryFunction · 0.85

Calls 4

parse_arrayFunction · 0.50
resizeFunction · 0.50
sizeFunction · 0.50
parse_floatFunction · 0.50

Tested by

no test coverage detected