diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-03 20:51:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-08 00:12:07 +0100 |
| commit | 3f2675aab119e55f958563e2fe6949192a2b976d (patch) | |
| tree | 2ed8c7e2a0eb7147ab9b798e934d1f7a4ce453a9 /src/lib/config.cc | |
| parent | f180d199dcb0217ea9750ab0a788217689733c41 (diff) | |
Don't use an optional for the Grok config object.
I'm not sure why I did it like this in the first place - perhaps so that
if the API endpoint changes there aren't so many old values stuck in
config files all over the place? Anyway, it seems cleaner to do it like
this, as it's how we handle the other config.
Diffstat (limited to 'src/lib/config.cc')
| -rw-r--r-- | src/lib/config.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 3227ea433..49c64e5b6 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -238,7 +238,7 @@ Config::set_defaults() set_cover_sheet_to_default(); #ifdef DCPOMATIC_GROK - _grok = boost::none; + _grok = {}; #endif _main_divider_sash_position = {}; @@ -1151,9 +1151,7 @@ Config::write_config() const cxml::add_text_child(root, "LayoutForShortScreen", _layout_for_short_screen ? "1" : "0"); #ifdef DCPOMATIC_GROK - if (_grok) { - _grok->as_xml(cxml::add_child(root, "Grok")); - } + _grok.as_xml(cxml::add_child(root, "Grok")); #endif _export.write(cxml::add_child(root, "Export")); |
