| 42 | } |
| 43 | |
| 44 | bool GlobalOptionConfig::load() |
| 45 | { |
| 46 | LogFunc << VAR(config_path_); |
| 47 | |
| 48 | auto json_opt = json::open(config_path_, true, true); |
| 49 | if (!json_opt) { |
| 50 | LogError << "Failed to open json file" << config_path_; |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | auto& json = *json_opt; |
| 55 | |
| 56 | if (!json.is<Option>()) { |
| 57 | LogError << "Json is not an Option" << VAR(json); |
| 58 | return false; |
| 59 | } |
| 60 | |
| 61 | option_ = (Option)json; |
| 62 | return true; |
| 63 | } |
| 64 | |
| 65 | bool GlobalOptionConfig::apply_option() |
| 66 | { |
nothing calls this directly
no outgoing calls
no test coverage detected