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

Function load

src/resource/simple_resource.cpp:14–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace simple_resource
13{
14 void *load(File &file, Allocator &a)
15 {
16 const u32 file_size = file.size();
17 void *data = a.allocate(file_size, 16);
18 file.read(data, file_size);
19 return data;
20 }
21
22 void unload(Allocator &a, void *data)
23 {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
allocateMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected