summaryrefslogtreecommitdiff
path: root/src/wx/content_version_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-28 22:12:54 +0200
committerCarl Hetherington <cth@carlh.net>2022-04-29 23:37:48 +0200
commit54141c7a9504e289d41af997067ca6b78a1d4b0a (patch)
tree4f792d29c6d090837be267362334151b23f00399 /src/wx/content_version_dialog.cc
parentaff13422649363d7fed58287958ca66b363825ba (diff)
Fix (I think) some strange situations where ::get() on dialogs
used by EditableList would return something that wasn't a optional<> but would then get implicitly cast to one. Now we have a static_assert to check that the type is what we expect.
Diffstat (limited to 'src/wx/content_version_dialog.cc')
-rw-r--r--src/wx/content_version_dialog.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/content_version_dialog.cc b/src/wx/content_version_dialog.cc
index 37c9cd416..876f43838 100644
--- a/src/wx/content_version_dialog.cc
+++ b/src/wx/content_version_dialog.cc
@@ -24,6 +24,7 @@
using std::string;
+using boost::optional;
ContentVersionDialog::ContentVersionDialog (wxWindow* parent)
@@ -46,7 +47,7 @@ ContentVersionDialog::set (string r)
}
-string
+optional<string>
ContentVersionDialog::get () const
{
return wx_to_std(_version->GetValue());