MCPcopy Create free account
hub / github.com/VitalAudio/visage / loadFileAsString

Function loadFileAsString

visage_utils/file_system.cpp:113–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 std::string loadFileAsString(const File& file) {
114 std::ifstream stream(file, std::ios::binary);
115 if (!stream)
116 return {};
117
118 stream.seekg(0, std::ios::end);
119 std::string out;
120 out.resize(stream.tellg());
121 stream.seekg(0, std::ios::beg);
122 stream.read(out.data(), out.size());
123 return out;
124 }
125
126 File hostExecutable() {
127#if VISAGE_WINDOWS

Callers 3

checkShaderForEditsMethod · 0.85
compileShaderMethod · 0.85

Calls 3

resizeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected