diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-06 17:52:51 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-08 01:29:35 +0200 |
| commit | 71f9236b03ef8934d28d291f1d9f248137448e72 (patch) | |
| tree | 3d709612d0f826e841c7dea0aea09775c53bb917 /src/wx/dcpomatic_choice.cc | |
| parent | 05535846f69e16bc659b874bcafd02a8ee9e96e7 (diff) | |
Return std::string rather than wxString from Choice::get_data().
Diffstat (limited to 'src/wx/dcpomatic_choice.cc')
| -rw-r--r-- | src/wx/dcpomatic_choice.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wx/dcpomatic_choice.cc b/src/wx/dcpomatic_choice.cc index c458296f6..5b3b9fb48 100644 --- a/src/wx/dcpomatic_choice.cc +++ b/src/wx/dcpomatic_choice.cc @@ -141,15 +141,16 @@ Choice::get() const } -optional<wxString> +optional<string> Choice::get_data() const { + auto index = get(); if (!index) { return {}; } - return dynamic_cast<wxStringClientData*>(GetClientObject(*index))->GetData(); + return wx_to_std(dynamic_cast<wxStringClientData*>(GetClientObject(*index))->GetData()); } |
