MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / ReadFile

Function ReadFile

src/tools/SpeedBenchmark.cpp:51–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static std::string ReadFile(const std::string& path) {
52 std::ifstream f(path, std::ios::binary);
53 if (!f) {
54 throw std::runtime_error("cannot open file: " + path);
55 }
56 return std::string(std::istreambuf_iterator<char>(f), {});
57}
58
59int main(int argc, char** argv) {
60 std::string resourceZip;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected