MCPcopy Create free account
hub / github.com/OpenBoardView/OpenBoardView / SaveDefault

Method SaveDefault

src/openboardview/confparse.cpp:224–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224int Confparse::SaveDefault(const filesystem::path &filepath) {
225 ofstream file;
226 file.open(filepath, std::ios::out | std::ios::binary | std::ios::ate);
227
228 nested = true;
229 if (file.is_open()) {
230 file.write(default_conf, sizeof(default_conf) - 1);
231 file.close();
232 Load(filepath);
233
234 return 0;
235 } else {
236 return 1;
237 }
238}
239
240int Confparse::Load(const filesystem::path &filepath, bool save_default) {
241 ifstream file;

Callers

nothing calls this directly

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected