X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Feditable_list.h;h=e82c4f91cdf77b44d9c35eb5bb786f6e3ae00b06;hb=54141c7a9504e289d41af997067ca6b78a1d4b0a;hp=3f2ea0ca2fe0afad40f7a1e2b5512e6c817282ac;hpb=8963f0007af1a312017b9627c18b82ec2a577591;p=dcpomatic.git diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h index 3f2ea0ca2..e82c4f91c 100644 --- a/src/wx/editable_list.h +++ b/src/wx/editable_list.h @@ -18,15 +18,21 @@ */ + #ifndef DCPOMATIC_EDITABLE_LIST_H #define DCPOMATIC_EDITABLE_LIST_H -#include "wx_util.h" + #include "dcpomatic_button.h" -#include +#include "wx_util.h" +#include +LIBDCP_DISABLE_WARNINGS #include +#include +LIBDCP_ENABLE_WARNINGS #include + class EditableListColumn { public: @@ -204,7 +210,8 @@ private: S* dialog = new S (this); if (dialog->ShowModal() == wxID_OK) { - boost::optional const v = dialog->get (); + auto const v = dialog->get (); + static_assert(std::is_same::type, boost::optional>::value, "get() must return boost::optional"); if (v) { add_to_control (v.get ()); std::vector all = _get (); @@ -229,7 +236,8 @@ private: S* dialog = new S (this); dialog->set (all[item]); if (dialog->ShowModal() == wxID_OK) { - boost::optional const v = dialog->get (); + auto const v = dialog->get (); + static_assert(std::is_same::type, boost::optional>::value, "get() must return boost::optional"); if (!v) { return; }