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

Function LoadDiskFile

source/common/widgets/widgetresourcedata.cpp:40–50  ·  view source on GitHub ↗

this must be allowed to fail without throwing.

Source from the content-addressed store, hash-verified

38
39// this must be allowed to fail without throwing.
40static std::vector<uint8_t> LoadDiskFile(const char* name)
41{
42 std::vector<uint8_t> buffer;
43 FileSys::FileReader lump;
44 if (lump.OpenFile(name))
45 {
46 buffer.resize(lump.GetLength());
47 lump.Read(buffer.data(), buffer.size());
48 }
49 return buffer;
50}
51
52// This interface will later require some significant redesign.
53std::vector<SingleFontData> LoadWidgetFontData(const std::string& name)

Callers 1

LoadWidgetFontDataFunction · 0.85

Calls 6

OpenFileMethod · 0.45
resizeMethod · 0.45
GetLengthMethod · 0.45
ReadMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected