Cleanup: clarify some namespace use.
authorCarl Hetherington <cth@carlh.net>
Thu, 22 Feb 2024 22:17:02 +0000 (23:17 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 20 Mar 2024 17:25:09 +0000 (18:25 +0100)
src/lib/dcp_content_type.cc
src/lib/filter.cc
src/wx/file_picker_ctrl.cc
src/wx/film_name_location_dialog.cc

index bc9bf0d6775d47939c365a66d9040e94a557a2a2..d689f138cafd2aaa1599df2918d24fb718284e52 100644 (file)
@@ -28,8 +28,9 @@
 #include "i18n.h"
 
 
+using std::string;
+using std::vector;
 using boost::optional;
-using namespace std;
 
 
 vector<DCPContentType> DCPContentType::_dcp_content_types;
index 9a14795eccf70c9ebe26427ff35c058da262c4d2..465b5991a41754bec81b4fbe21e1d9ce6353a8e6 100644 (file)
@@ -37,7 +37,8 @@ LIBDCP_ENABLE_WARNINGS
 #include "i18n.h"
 
 
-using namespace std;
+using std::string;
+using std::vector;
 using boost::optional;
 
 
index 7aa0bfb40cc9d9031a238c7e3f39f2980773a34d..c6aba45b74121e9ee84f229c0884552e46f97dbd 100644 (file)
@@ -32,8 +32,8 @@ LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
 
 
-using namespace std;
-using namespace boost;
+using std::string;
+using boost::optional;
 
 
 FilePickerCtrl::FilePickerCtrl(
@@ -42,9 +42,9 @@ FilePickerCtrl::FilePickerCtrl(
        wxString wildcard,
        bool open,
        bool warn_overwrite,
-       std::string initial_path_key,
+       string initial_path_key,
        optional<std::string> initial_filename,
-       optional<filesystem::path> override_path
+       optional<boost::filesystem::path> override_path
        )
        : wxPanel (parent)
        , _prompt (prompt)
index 05ffa7a685264cfbd46a3e683f21015b3be2bd16..9d309810e5f93392831a6ce568c9fce0a910b96b 100644 (file)
@@ -35,11 +35,12 @@ LIBDCP_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
 
 
-using namespace std;
-using namespace boost;
+using std::string;
+using boost::bind;
+using boost::optional;
 
 
-optional<filesystem::path> FilmNameLocationDialog::_directory;
+optional<boost::filesystem::path> FilmNameLocationDialog::_directory;
 
 
 FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title, bool offer_templates)
@@ -112,10 +113,10 @@ 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;
@@ -139,7 +140,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 +151,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())