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

Function create

src/world/level.cpp:44–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42namespace level
43{
44 Level *create(Allocator &a, const LevelResource *level_resource)
45 {
46 Level *l = (Level *)a.allocate(sizeof(*l) + level_resource->num_units*sizeof(UnitId));
47 return new (l) Level(level_resource, (UnitId *)&l[1]);
48 }
49
50 void destroy(Allocator &a, Level *level)
51 {

Callers 4

WorldMethod · 0.70
create_debug_lineMethod · 0.70
load_levelMethod · 0.70
updateMethod · 0.70

Calls 1

allocateMethod · 0.45

Tested by

no test coverage detected