From b29a0f4bc67f6f8cc84c3d88cdbb9582e35d3fed Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 20 Feb 2025 23:06:59 +0100 Subject: Return std::vector instead of boost::optional from the EditableList dialog. It's a bit clumsy, as returning more than one thing only makes sense when adding (not when editing), but allowing both optional and vector with template voodoo seems awkward (at least with C++11). --- src/wx/screen_dialog.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/wx/screen_dialog.cc') diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index d0cf499e9..21786b8a2 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -86,13 +86,13 @@ public: setup_sensitivity(); } - optional get () + vector get() { auto const t = wx_to_std (_thumbprint->GetValue()); if (_certificate && _certificate->thumbprint() == t) { - return TrustedDevice (*_certificate); + return { TrustedDevice(*_certificate) }; } else if (t.length() == 28) { - return TrustedDevice (t); + return { TrustedDevice(t) }; } return {}; -- cgit v1.2.3