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

Function flatten

src/resource/unit_compiler.cpp:1256–1277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1254 }
1255
1256 s32 flatten(UnitCompiler &c, CompileOptions &opts)
1257 {
1258 auto cur = hash_map::begin(c._units);
1259 auto end = hash_map::end(c._units);
1260 for (; cur != end; ++cur) {
1261 HASH_MAP_SKIP_HOLE(c._units, cur);
1262
1263 s32 err = assign_unit_indices(c, cur->second, UINT32_MAX, opts);
1264 ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts);
1265 }
1266
1267 cur = hash_map::begin(c._units);
1268 end = hash_map::end(c._units);
1269 for (; cur != end; ++cur) {
1270 HASH_MAP_SKIP_HOLE(c._units, cur);
1271
1272 s32 err = flatten_unit(c, cur->second, UINT32_MAX, opts);
1273 ENSURE_OR_RETURN(UNIT_COMPILER, err == 0, opts);
1274 }
1275
1276 return 0;
1277 }
1278
1279 s32 blob(Buffer &output, UnitCompiler &c)
1280 {

Callers 8

flattenMethod · 0.85
addFlattenedMemberMethod · 0.85
transformEntryPointMethod · 0.85
declareVariableMethod · 0.85
parse_unit_from_jsonFunction · 0.85

Calls 4

assign_unit_indicesFunction · 0.85
flatten_unitFunction · 0.85
beginFunction · 0.50
endFunction · 0.50

Tested by

no test coverage detected