| 214 | } |
| 215 | |
| 216 | void Config::write() { |
| 217 | auto str = this->make(); |
| 218 | |
| 219 | auto loc = Config::find_config(); |
| 220 | FILE *fp = std::fopen(loc.data(), "w"); |
| 221 | FZ_SCOPEGUARD([&fp] { std::fclose(fp); }); |
| 222 | if (!fp) |
| 223 | return; |
| 224 | |
| 225 | std::fwrite(str.c_str(), str.length(), 1, fp); |
| 226 | } |
| 227 | |
| 228 | Result update(Config &config) { |
| 229 | if (auto rc = fizeauGetIsActive(&config.active); R_FAILED(rc)) |
no test coverage detected