diff --git a/ozi.cc b/ozi.cc index 0e9bcdd47..1c156e3e6 100644 --- a/ozi.cc +++ b/ozi.cc @@ -389,16 +389,16 @@ OziFormat::wr_init(const QString& fname) mkshort_handle->set_length(xstrtoi(snlenopt, nullptr, 10)); - if (snwhiteopt) { - mkshort_handle->set_whitespace_ok(xstrtoi(snwhiteopt, nullptr, 10)); + if (snwhiteopt.has_value()) { + mkshort_handle->set_whitespace_ok(snwhiteopt); } - if (snupperopt) { - mkshort_handle->set_mustupper(xstrtoi(snupperopt, nullptr, 10)); + if (snupperopt.has_value()) { + mkshort_handle->set_mustupper(snupperopt); } - if (snuniqueopt) { - mkshort_handle->set_mustuniq(xstrtoi(snuniqueopt, nullptr, 10)); + if (snuniqueopt.has_value()) { + mkshort_handle->set_mustuniq(snuniqueopt); } mkshort_handle->set_badchars("\","); diff --git a/ozi.h b/ozi.h index c33392866..c83dffe5f 100644 --- a/ozi.h +++ b/ozi.h @@ -125,12 +125,12 @@ class OziFormat : public Format int new_track{}; OptionCString snlenopt; - OptionCString snwhiteopt; - OptionCString snupperopt; - OptionCString snuniqueopt; + OptionBool snwhiteopt; + OptionBool snupperopt; + OptionBool snuniqueopt; OptionCString wptfgcolor; OptionCString wptbgcolor; - OptionCString pack_opt; + OptionBool pack_opt; int datum{}; OptionCString proximityarg; double proximity{}; diff --git a/xcsv.cc b/xcsv.cc index a1a92095f..74f94c65e 100644 --- a/xcsv.cc +++ b/xcsv.cc @@ -1965,16 +1965,16 @@ XcsvFormat::wr_init(const QString& fname) xcsv_file->mkshort_handle.set_length(xstrtoi(snlenopt, nullptr, 10)); } - if (snwhiteopt) { - xcsv_file->mkshort_handle.set_whitespace_ok(xstrtoi(snwhiteopt, nullptr, 10)); + if (snwhiteopt.has_value()) { + xcsv_file->mkshort_handle.set_whitespace_ok(snwhiteopt); } - if (snupperopt) { - xcsv_file->mkshort_handle.set_mustupper(xstrtoi(snupperopt, nullptr, 10)); + if (snupperopt.has_value()) { + xcsv_file->mkshort_handle.set_mustupper(snupperopt); } - if (snuniqueopt) { - xcsv_file->mkshort_handle.set_mustuniq(xstrtoi(snuniqueopt, nullptr, 10)); + if (snuniqueopt.has_value()) { + xcsv_file->mkshort_handle.set_mustuniq(snuniqueopt); } xcsv_file->mkshort_handle.set_badchars(CSTR(xcsv_style->badchars)); diff --git a/xcsv.h b/xcsv.h index 43b8482fa..2cf92ac82 100644 --- a/xcsv.h +++ b/xcsv.h @@ -372,10 +372,10 @@ class XcsvFormat : public Format OptionCString styleopt; OptionCString snlenopt; - OptionCString snwhiteopt; - OptionCString snupperopt; - OptionCString snuniqueopt; - OptionCString prefer_shortnames; + OptionBool snwhiteopt; + OptionBool snupperopt; + OptionBool snuniqueopt; + OptionBool prefer_shortnames; OptionCString xcsv_urlbase; OptionCString opt_datum; OptionCString opt_utc;