MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator / ReadFile

Function ReadFile

src/Common.cpp:27–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#ifdef _WIN32
26
27void ReadFile(std::vector<char>& out, const char* fileName)
28{
29 std::ifstream file(fileName, std::ios::ate | std::ios::binary);
30 assert(file.is_open());
31 size_t fileSize = (size_t)file.tellg();
32 if(fileSize > 0)
33 {
34 out.resize(fileSize);
35 file.seekg(0);
36 file.read(out.data(), fileSize);
37 }
38 else
39 out.clear();
40}
41
42void SetConsoleColor(CONSOLE_COLOR color)
43{

Callers

nothing calls this directly

Calls 3

resizeMethod · 0.80
dataMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected