MCPcopy Create free account
hub / github.com/ZDoom/Raze / LoadFile

Function LoadFile

source/common/widgets/widgetresourcedata.cpp:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27static std::vector<uint8_t> LoadFile(const char* name)
28{
29 auto lump = WidgetResources->FindEntry(name);
30 if (lump == -1)
31 I_FatalError("Unable to find %s", name);
32
33 auto reader = WidgetResources->GetEntryReader(lump, FileSys::READER_SHARED);
34 std::vector<uint8_t> buffer(reader.GetLength());
35 reader.Read(buffer.data(), buffer.size());
36 return buffer;
37}
38
39// this must be allowed to fail without throwing.
40static std::vector<uint8_t> LoadDiskFile(const char* name)

Callers 2

LoadWidgetFontDataFunction · 0.85
LoadWidgetDataFunction · 0.85

Calls 7

I_FatalErrorFunction · 0.85
FindEntryMethod · 0.45
GetEntryReaderMethod · 0.45
GetLengthMethod · 0.45
ReadMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected