From 8ddd12a60d08d895cb5400013cdda2e893fb81bb Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 15 Aug 2013 20:04:08 +1000 Subject: Rename SearchPath class Searchpath Windows headers define SearchPath which means we have to undefine it where necessary. This is a pain and can be tricksy, so I feel renaming the class slightly is the easiest solution. --- libs/ardour/ardour/control_protocol_search_path.h | 6 +++--- libs/ardour/ardour/export_formats_search_path.h | 4 ++-- libs/ardour/ardour/export_profile_manager.h | 6 +----- libs/ardour/ardour/filesystem_paths.h | 8 ++------ libs/ardour/ardour/ladspa_search_path.h | 6 +++--- libs/ardour/ardour/lv2_bundled_search_path.h | 4 ++-- libs/ardour/ardour/midi_patch_search_path.h | 6 +++--- libs/ardour/ardour/panner_search_path.h | 6 +++--- libs/ardour/control_protocol_manager.cc | 4 ---- libs/ardour/control_protocol_search_path.cc | 6 +++--- libs/ardour/export_formats_search_path.cc | 6 +++--- libs/ardour/filesystem_paths.cc | 14 +++++++------- libs/ardour/globals.cc | 2 +- libs/ardour/jack_utils.cc | 4 ++-- libs/ardour/ladspa_search_path.cc | 6 +++--- libs/ardour/lv2_bundled_search_path.cc | 4 ++-- libs/ardour/midi_patch_manager.cc | 6 +----- libs/ardour/midi_patch_search_path.cc | 6 +++--- libs/ardour/panner_manager.cc | 4 ---- libs/ardour/panner_search_path.cc | 6 +++--- libs/ardour/plugin_manager.cc | 4 ---- libs/ardour/session.cc | 16 ++++++---------- libs/ardour/session_state.cc | 10 +++++----- libs/ardour/template_utils.cc | 16 ++++++---------- libs/ardour/test/plugins_test.cc | 2 +- libs/ardour/test/resampled_source_test.cc | 2 +- libs/ardour/test/test_common.cc | 2 +- libs/ardour/test/test_common.h | 2 +- 28 files changed, 68 insertions(+), 100 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/ardour/control_protocol_search_path.h b/libs/ardour/ardour/control_protocol_search_path.h index 8795f4501a..4fe790ef80 100644 --- a/libs/ardour/ardour/control_protocol_search_path.h +++ b/libs/ardour/ardour/control_protocol_search_path.h @@ -25,15 +25,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * control surface plugins. * - * If ARDOUR_SURFACES_PATH is defined then the SearchPath returned + * If ARDOUR_SURFACES_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath control_protocol_search_path (); + PBD::Searchpath control_protocol_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_formats_search_path.h b/libs/ardour/ardour/export_formats_search_path.h index 7b6fcea09b..771c6f9bd3 100644 --- a/libs/ardour/ardour/export_formats_search_path.h +++ b/libs/ardour/ardour/export_formats_search_path.h @@ -24,10 +24,10 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * export_formats. */ - PBD::SearchPath export_formats_search_path (); + PBD::Searchpath export_formats_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/export_profile_manager.h b/libs/ardour/ardour/export_profile_manager.h index 114fb09647..77ace497c2 100644 --- a/libs/ardour/ardour/export_profile_manager.h +++ b/libs/ardour/ardour/export_profile_manager.h @@ -38,10 +38,6 @@ #include "ardour/types.h" #include "ardour/export_handler.h" -#ifdef SearchPath -#undef SearchPath -#endif - namespace ARDOUR { @@ -106,7 +102,7 @@ class ExportProfileManager std::vector find_file (std::string const & pattern); std::string export_config_dir; - PBD::SearchPath search_path; + PBD::Searchpath search_path; /* Timespans */ public: diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h index 7c817e86a1..e77de1c00f 100644 --- a/libs/ardour/ardour/filesystem_paths.h +++ b/libs/ardour/ardour/filesystem_paths.h @@ -22,10 +22,6 @@ #include "pbd/search_path.h" -#ifdef SearchPath -#undef SearchPath -#endif - namespace ARDOUR { /** @@ -45,14 +41,14 @@ namespace ARDOUR { * @return the search path to be used when looking for per-system * configuration files. This may include user configuration files. */ - PBD::SearchPath ardour_config_search_path (); + PBD::Searchpath ardour_config_search_path (); /** * @return the search path to be used when looking for data files * that could be shared by systems (h/w and configuration independent * files, such as icons, XML files, etc) */ - PBD::SearchPath ardour_data_search_path (); + PBD::Searchpath ardour_data_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/ladspa_search_path.h b/libs/ardour/ardour/ladspa_search_path.h index 791bba9188..bc184b5248 100644 --- a/libs/ardour/ardour/ladspa_search_path.h +++ b/libs/ardour/ardour/ladspa_search_path.h @@ -25,14 +25,14 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * LADSPA plugins. * - * If LADSPA_PATH is defined then the SearchPath returned + * If LADSPA_PATH is defined then the Searchpath returned * will contain the directories specified in it as well as the * user and system directories. */ - PBD::SearchPath ladspa_search_path (); + PBD::Searchpath ladspa_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/lv2_bundled_search_path.h b/libs/ardour/ardour/lv2_bundled_search_path.h index f5780c5e0e..9314ee27d4 100644 --- a/libs/ardour/ardour/lv2_bundled_search_path.h +++ b/libs/ardour/ardour/lv2_bundled_search_path.h @@ -25,10 +25,10 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * lv2 plugins. */ - PBD::SearchPath lv2_bundled_search_path (); + PBD::Searchpath lv2_bundled_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/midi_patch_search_path.h b/libs/ardour/ardour/midi_patch_search_path.h index 5d27823461..168e75af4a 100644 --- a/libs/ardour/ardour/midi_patch_search_path.h +++ b/libs/ardour/ardour/midi_patch_search_path.h @@ -24,15 +24,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * MIDI patch files ("*.midnam") aka MIDNAM files * - * If ARDOUR_MIDI_PATCH_PATH is defined then the SearchPath returned + * If ARDOUR_MIDI_PATCH_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath midi_patch_search_path (); + PBD::Searchpath midi_patch_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/ardour/panner_search_path.h b/libs/ardour/ardour/panner_search_path.h index 889b9efb23..23004223b4 100644 --- a/libs/ardour/ardour/panner_search_path.h +++ b/libs/ardour/ardour/panner_search_path.h @@ -24,15 +24,15 @@ namespace ARDOUR { /** - * return a SearchPath containing directories in which to look for + * return a Searchpath containing directories in which to look for * panner plugins. * - * If ARDOUR_PANNER_PATH is defined then the SearchPath returned + * If ARDOUR_PANNER_PATH is defined then the Searchpath returned * will contain only those directories specified in it, otherwise it will * contain the user and system directories which may contain control * surface plugins. */ - PBD::SearchPath panner_search_path (); + PBD::Searchpath panner_search_path (); } // namespace ARDOUR diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 3ccc1f134b..06c9c72cb4 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -30,10 +30,6 @@ #include "ardour/debug.h" #include "ardour/control_protocol_manager.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/control_protocol_search_path.h" diff --git a/libs/ardour/control_protocol_search_path.cc b/libs/ardour/control_protocol_search_path.cc index 254cd03fe9..c5c5d0ba00 100644 --- a/libs/ardour/control_protocol_search_path.cc +++ b/libs/ardour/control_protocol_search_path.cc @@ -33,14 +33,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath control_protocol_search_path () { - SearchPath spath(user_config_directory ()); + Searchpath spath(user_config_directory ()); spath += ardour_dll_directory (); spath.add_subdirectory_to_paths (surfaces_dir_name); - spath += SearchPath(Glib::getenv(surfaces_env_variable_name)); + spath += Searchpath(Glib::getenv(surfaces_env_variable_name)); return spath; } diff --git a/libs/ardour/export_formats_search_path.cc b/libs/ardour/export_formats_search_path.cc index cf18b14a18..ffa096d33a 100644 --- a/libs/ardour/export_formats_search_path.cc +++ b/libs/ardour/export_formats_search_path.cc @@ -32,14 +32,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath export_formats_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths (export_formats_dir_name); bool export_formats_path_defined = false; - SearchPath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined)); + Searchpath spath_env (Glib::getenv(export_env_variable_name, export_formats_path_defined)); if (export_formats_path_defined) { spath += spath_env; diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc index 8d48ea3068..54f7508b65 100644 --- a/libs/ardour/filesystem_paths.cc +++ b/libs/ardour/filesystem_paths.cc @@ -101,7 +101,7 @@ ardour_dll_directory () } #ifdef PLATFORM_WINDOWS -SearchPath +Searchpath windows_search_path () { std::string dll_dir_path(g_win32_get_package_installation_directory_of_module(NULL)); @@ -110,10 +110,10 @@ windows_search_path () } #endif -SearchPath +Searchpath ardour_config_search_path () { - static SearchPath search_path; + static Searchpath search_path; if (search_path.empty()) { search_path += user_config_directory(); @@ -126,17 +126,17 @@ ardour_config_search_path () ::exit (1); } - search_path += SearchPath (s); + search_path += Searchpath (s); #endif } return search_path; } -SearchPath +Searchpath ardour_data_search_path () { - static SearchPath search_path; + static Searchpath search_path; if (search_path.empty()) { search_path += user_config_directory(); @@ -149,7 +149,7 @@ ardour_data_search_path () ::exit (1); } - search_path += SearchPath (s); + search_path += Searchpath (s); #endif } diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index f4cc81a260..1406bbd43a 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -388,7 +388,7 @@ void ARDOUR::find_bindings_files (map& files) { vector found; - SearchPath spath = ardour_config_search_path(); + Searchpath spath = ardour_config_search_path(); if (getenv ("ARDOUR_SAE")) { Glib::PatternSpec pattern("*SAE-*.bindings"); diff --git a/libs/ardour/jack_utils.cc b/libs/ardour/jack_utils.cc index f37473c4e7..64e58bf608 100644 --- a/libs/ardour/jack_utils.cc +++ b/libs/ardour/jack_utils.cc @@ -584,7 +584,7 @@ ARDOUR::set_path_env_for_jack_autostart (const vector& dirs) #ifdef __APPLE__ // push it back into the environment so that auto-started JACK can find it. // XXX why can't we just expect OS X users to have PATH set correctly? we can't ... - setenv ("PATH", SearchPath(dirs).to_string().c_str(), 1); + setenv ("PATH", Searchpath(dirs).to_string().c_str(), 1); #else (void) dirs; #endif @@ -606,7 +606,7 @@ ARDOUR::get_jack_server_dir_paths (vector& server_dir_paths) server_dir_paths.push_back (Glib::path_get_dirname (execpath)); #endif - SearchPath sp(string(g_getenv("PATH"))); + Searchpath sp(string(g_getenv("PATH"))); #ifdef PLATFORM_WINDOWS gchar *install_dir = g_win32_get_package_installation_directory_of_module (NULL); diff --git a/libs/ardour/ladspa_search_path.cc b/libs/ardour/ladspa_search_path.cc index 5ba7a17167..49a2645f5d 100644 --- a/libs/ardour/ladspa_search_path.cc +++ b/libs/ardour/ladspa_search_path.cc @@ -33,12 +33,12 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath ladspa_search_path () { - SearchPath spath_env (Glib::getenv(ladspa_env_variable_name)); + Searchpath spath_env (Glib::getenv(ladspa_env_variable_name)); - SearchPath spath (user_config_directory ()); + Searchpath spath (user_config_directory ()); spath += ardour_dll_directory (); spath.add_subdirectory_to_paths (ladspa_dir_name); diff --git a/libs/ardour/lv2_bundled_search_path.cc b/libs/ardour/lv2_bundled_search_path.cc index d8cd1c1075..2454ea2ae1 100644 --- a/libs/ardour/lv2_bundled_search_path.cc +++ b/libs/ardour/lv2_bundled_search_path.cc @@ -29,10 +29,10 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath lv2_bundled_search_path () { - SearchPath spath( ardour_dll_directory () ); + Searchpath spath( ardour_dll_directory () ); spath.add_subdirectory_to_paths ("LV2"); return spath; diff --git a/libs/ardour/midi_patch_manager.cc b/libs/ardour/midi_patch_manager.cc index f3541a2e62..f2d964bb77 100644 --- a/libs/ardour/midi_patch_manager.cc +++ b/libs/ardour/midi_patch_manager.cc @@ -29,10 +29,6 @@ #include "ardour/session_directory.h" #include "ardour/midi_patch_manager.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/midi_patch_search_path.h" #include "i18n.h" @@ -107,7 +103,7 @@ MidiPatchManager::refresh() _master_devices_by_model.clear(); _all_models.clear(); - SearchPath search_path = midi_patch_search_path (); + Searchpath search_path = midi_patch_search_path (); Glib::PatternSpec pattern (string("*.midnam")); vector result; diff --git a/libs/ardour/midi_patch_search_path.cc b/libs/ardour/midi_patch_search_path.cc index ccad1de466..c099c379e9 100644 --- a/libs/ardour/midi_patch_search_path.cc +++ b/libs/ardour/midi_patch_search_path.cc @@ -31,14 +31,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath midi_patch_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(midi_patch_dir_name); bool midi_patch_path_defined = false; - SearchPath spath_env (Glib::getenv(midi_patch_env_variable_name, midi_patch_path_defined)); + Searchpath spath_env (Glib::getenv(midi_patch_env_variable_name, midi_patch_path_defined)); if (midi_patch_path_defined) { spath += spath_env; diff --git a/libs/ardour/panner_manager.cc b/libs/ardour/panner_manager.cc index 4e4ad7fe4d..f757279d29 100644 --- a/libs/ardour/panner_manager.cc +++ b/libs/ardour/panner_manager.cc @@ -29,10 +29,6 @@ #include "ardour/debug.h" #include "ardour/panner_manager.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/panner_search_path.h" #include "i18n.h" diff --git a/libs/ardour/panner_search_path.cc b/libs/ardour/panner_search_path.cc index 63802ffc4e..100c406edd 100644 --- a/libs/ardour/panner_search_path.cc +++ b/libs/ardour/panner_search_path.cc @@ -31,14 +31,14 @@ using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath panner_search_path () { - SearchPath spath(user_config_directory ()); + Searchpath spath(user_config_directory ()); spath += ardour_dll_directory (); spath.add_subdirectory_to_paths(panner_dir_name); - spath += SearchPath(Glib::getenv(panner_env_variable_name)); + spath += Searchpath(Glib::getenv(panner_env_variable_name)); return spath; } diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 8d4e625876..8d209cc78e 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -59,10 +59,6 @@ #include "ardour/plugin_manager.h" #include "ardour/rc_configuration.h" -#ifdef SearchPath -#undef SearchPath -#endif - #include "ardour/ladspa_search_path.h" #ifdef LV2_SUPPORT diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 9817f17069..428a5e5274 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -94,10 +94,6 @@ #include "i18n.h" -#ifdef SearchPath -#undef SearchPath -#endif - namespace ARDOUR { class MidiSource; class Processor; @@ -4434,7 +4430,7 @@ Session::end_time_changed (framepos_t old) std::vector Session::source_search_path (DataType type) const { - SearchPath sp; + Searchpath sp; if (session_dirs.size() == 1) { switch (type) { @@ -4472,10 +4468,10 @@ Session::source_search_path (DataType type) const switch (type) { case DataType::AUDIO: - sp += SearchPath(config.get_audio_search_path ()); + sp += Searchpath(config.get_audio_search_path ()); break; case DataType::MIDI: - sp += SearchPath(config.get_midi_search_path ()); + sp += Searchpath(config.get_midi_search_path ()); break; } @@ -4485,7 +4481,7 @@ Session::source_search_path (DataType type) const void Session::ensure_search_path_includes (const string& path, DataType type) { - SearchPath sp; + Searchpath sp; if (path == ".") { return; @@ -4493,10 +4489,10 @@ Session::ensure_search_path_includes (const string& path, DataType type) switch (type) { case DataType::AUDIO: - sp += SearchPath(config.get_audio_search_path ()); + sp += Searchpath(config.get_audio_search_path ()); break; case DataType::MIDI: - sp += SearchPath (config.get_midi_search_path ()); + sp += Searchpath (config.get_midi_search_path ()); break; } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 4837d8450e..9699a7c37f 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -384,7 +384,7 @@ Session::second_stage_init () string Session::raid_path () const { - SearchPath raid_search_path; + Searchpath raid_search_path; for (vector::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) { raid_search_path += (*i).path; @@ -405,11 +405,11 @@ Session::setup_raid_path (string path) session_dirs.clear (); - SearchPath search_path(path); - SearchPath sound_search_path; - SearchPath midi_search_path; + Searchpath search_path(path); + Searchpath sound_search_path; + Searchpath midi_search_path; - for (SearchPath::const_iterator i = search_path.begin(); i != search_path.end(); ++i) { + for (Searchpath::const_iterator i = search_path.begin(); i != search_path.end(); ++i) { sp.path = *i; sp.blocks = 0; // not needed session_dirs.push_back (sp); diff --git a/libs/ardour/template_utils.cc b/libs/ardour/template_utils.cc index faecdc6e63..b912fdc446 100644 --- a/libs/ardour/template_utils.cc +++ b/libs/ardour/template_utils.cc @@ -32,27 +32,23 @@ #include "ardour/filename_extensions.h" #include "ardour/io.h" -#ifdef SearchPath -#undef SearchPath -#endif - using namespace std; using namespace PBD; namespace ARDOUR { -SearchPath +Searchpath template_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(templates_dir_name); return spath; } -SearchPath +Searchpath route_template_search_path () { - SearchPath spath (ardour_data_search_path()); + Searchpath spath (ardour_data_search_path()); spath.add_subdirectory_to_paths(route_templates_dir_name); return spath; } @@ -101,7 +97,7 @@ find_session_templates (vector& template_names) { vector *templates; PathScanner scanner; - SearchPath spath (template_search_path()); + Searchpath spath (template_search_path()); templates = scanner (spath.to_string(), template_filter, 0, true, true); @@ -137,7 +133,7 @@ find_route_templates (vector& template_names) { vector *templates; PathScanner scanner; - SearchPath spath (route_template_search_path()); + Searchpath spath (route_template_search_path()); templates = scanner (spath.to_string(), route_template_filter, 0, false, true); diff --git a/libs/ardour/test/plugins_test.cc b/libs/ardour/test/plugins_test.cc index 362a56df7f..0e4bddcda6 100644 --- a/libs/ardour/test/plugins_test.cc +++ b/libs/ardour/test/plugins_test.cc @@ -32,7 +32,7 @@ PluginsTest::test () pm.refresh (); - SearchPath ladspa_paths(ladspa_search_path ()); + Searchpath ladspa_paths(ladspa_search_path ()); cout << "Number of Ladspa paths found: " << ladspa_paths.size () << endl; diff --git a/libs/ardour/test/resampled_source_test.cc b/libs/ardour/test/resampled_source_test.cc index 5aaf71b7aa..c8ef0f4a95 100644 --- a/libs/ardour/test/resampled_source_test.cc +++ b/libs/ardour/test/resampled_source_test.cc @@ -1,4 +1,4 @@ -// this is included first to avoid SearchPath definition on windows +// this is included first to avoid Searchpath definition on windows #include "test_common.h" #include "pbd/file_utils.h" diff --git a/libs/ardour/test/test_common.cc b/libs/ardour/test/test_common.cc index 68039b289b..5f802fbf5a 100644 --- a/libs/ardour/test/test_common.cc +++ b/libs/ardour/test/test_common.cc @@ -25,7 +25,7 @@ using namespace std; -PBD::SearchPath +PBD::Searchpath test_search_path () { #ifdef PLATFORM_WINDOWS diff --git a/libs/ardour/test/test_common.h b/libs/ardour/test/test_common.h index 9e15458781..10bfdbc694 100644 --- a/libs/ardour/test/test_common.h +++ b/libs/ardour/test/test_common.h @@ -21,7 +21,7 @@ #include "pbd/search_path.h" -PBD::SearchPath test_search_path (); +PBD::Searchpath test_search_path (); std::string new_test_output_dir (); -- cgit v1.2.3