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

Function load

src/resource/config_resource.cpp:24–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace config_resource_internal
23{
24 void *load(File &file, Allocator &a)
25 {
26 const u32 size = file.size();
27 char *res = (char *)a.allocate(size + 1);
28 file.read(res, size);
29 res[size] = '\0';
30 return res;
31 }
32
33 void unload(Allocator &a, void *resource)
34 {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
allocateMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected