summaryrefslogtreecommitdiff
path: root/src/wx/film_name_location_dialog.cc
diff options
context:
space:
mode:
authorBenjamin Radel <benjamin@radel.tk>2024-06-28 21:56:36 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-30 16:17:18 +0200
commit0ca9937987ecf2bf3f579147ffc952838565415b (patch)
tree17ac30d3adef2e8a2dc5d2addbbbc0d8c4bc5644 /src/wx/film_name_location_dialog.cc
parent3dbe0b9ff88a16b938ad6adf2c26179e278fa712 (diff)
Make DCPoMatic compatible with ICU >= 75
ICU >= 75 uses c++17 features and therefore requires compilation with -std=c++17. However, this causes some namespace issues in src/wx/file_picker_ctrl.cc and src/wx/film_name_location_dialog.cc between boost::optional, boost::filesystem and the corresponding names from the std lib. The patch fixes this namespace issues and adds a version check in wscript to enable compilation with c++17, if icu >= 75 is detected.
Diffstat (limited to 'src/wx/film_name_location_dialog.cc')
-rw-r--r--src/wx/film_name_location_dialog.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wx/film_name_location_dialog.cc b/src/wx/film_name_location_dialog.cc
index 05ffa7a68..6c54f1848 100644
--- a/src/wx/film_name_location_dialog.cc
+++ b/src/wx/film_name_location_dialog.cc
@@ -39,7 +39,7 @@ using namespace std;
using namespace boost;
-optional<filesystem::path> FilmNameLocationDialog::_directory;
+boost::optional<boost::filesystem::path> FilmNameLocationDialog::_directory;
FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title, bool offer_templates)
@@ -112,17 +112,17 @@ FilmNameLocationDialog::folder_changed ()
}
-filesystem::path
+boost::filesystem::path
FilmNameLocationDialog::path () const
{
- filesystem::path p;
+ boost::filesystem::path p;
p /= wx_to_std (_folder->GetPath());
p /= wx_to_std (_name->GetValue());
return p;
}
-optional<string>
+boost::optional<string>
FilmNameLocationDialog::template_name () const
{
if (!_use_template->GetValue() || _template_name->GetSelection() == -1) {
@@ -139,7 +139,7 @@ FilmNameLocationDialog::template_name () const
bool
FilmNameLocationDialog::check_path ()
{
- if (filesystem::is_directory(path()) && !filesystem::is_empty(path())) {
+ if (boost::filesystem::is_directory(path()) && !boost::filesystem::is_empty(path())) {
if (!confirm_dialog (
this,
std_to_wx (
@@ -150,7 +150,7 @@ FilmNameLocationDialog::check_path ()
)) {
return false;
}
- } else if (filesystem::is_regular_file(path())) {
+ } else if (boost::filesystem::is_regular_file(path())) {
error_dialog (
this,
String::compose (wx_to_std(_("%1 already exists as a file, so you cannot use it for a film.")), path().c_str())