diff options
author | David Robillard <d@drobilla.net> | 2011-06-06 18:32:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-06 18:32:01 +0000 |
commit | 9adc6fb021bcde9720a8afcac9a1a87521691fba (patch) | |
tree | 8d9351dc02045dc2e8883d1ea6278ac2fca3a9bc | |
parent | 67d2cb50843c73024758d6f73c35bae37070b67b (diff) | |
download | patchage-9adc6fb021bcde9720a8afcac9a1a87521691fba.tar.gz patchage-9adc6fb021bcde9720a8afcac9a1a87521691fba.tar.bz2 patchage-9adc6fb021bcde9720a8afcac9a1a87521691fba.zip |
Use sane typedefs for collections.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3365 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/AlsaDriver.cpp | 4 | ||||
-rw-r--r-- | src/JackDbusDriver.cpp | 8 | ||||
-rw-r--r-- | src/JackDriver.cpp | 8 | ||||
-rw-r--r-- | src/Patchage.cpp | 3 | ||||
-rw-r--r-- | src/Patchage.hpp | 7 | ||||
-rw-r--r-- | src/PatchageModule.cpp | 4 |
6 files changed, 16 insertions, 18 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp index 5ab24bb..abd6b82 100644 --- a/src/AlsaDriver.cpp +++ b/src/AlsaDriver.cpp @@ -311,11 +311,11 @@ AlsaDriver::refresh_connections() boost::shared_ptr<PatchageModule> m; boost::shared_ptr<PatchagePort> p; - for (FlowCanvas::ItemList::iterator i = _app->canvas()->items().begin(); + for (FlowCanvas::Canvas::Items::iterator i = _app->canvas()->items().begin(); i != _app->canvas()->items().end(); ++i) { m = boost::dynamic_pointer_cast<PatchageModule>(*i); if (m) { - for (FlowCanvas::PortVector::const_iterator j = m->ports().begin(); j != m->ports().end(); ++j) { + for (FlowCanvas::Module::Ports::const_iterator j = m->ports().begin(); j != m->ports().end(); ++j) { p = boost::dynamic_pointer_cast<PatchagePort>(*j); if (p->type() == ALSA_MIDI) add_connections(p); diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp index d137575..51f71c6 100644 --- a/src/JackDbusDriver.cpp +++ b/src/JackDbusDriver.cpp @@ -87,14 +87,14 @@ JackDriver::~JackDriver() void JackDriver::destroy_all() { - FlowCanvas::ItemList modules = _app->canvas()->items(); // copy - for (FlowCanvas::ItemList::iterator m = modules.begin(); m != modules.end(); ++m) { + FlowCanvas::Items modules = _app->canvas()->items(); // copy + for (FlowCanvas::Items::iterator m = modules.begin(); m != modules.end(); ++m) { SharedPtr<FlowCanvas::Module> module = PtrCast<FlowCanvas::Module>(*m); if (!module) continue; - FlowCanvas::PortVector ports = module->ports(); // copy - for (FlowCanvas::PortVector::iterator p = ports.begin(); p != ports.end(); ++p) { + FlowCanvas::Module::Ports ports = module->ports(); // copy + for (FlowCanvas::Module::Ports::iterator p = ports.begin(); p != ports.end(); ++p) { SharedPtr<PatchagePort> port = boost::dynamic_pointer_cast<PatchagePort>(*p); if (port && (port->type() == JACK_AUDIO || port->type() == JACK_MIDI)) { module->remove_port(port); diff --git a/src/JackDriver.cpp b/src/JackDriver.cpp index 79ff93b..773fba9 100644 --- a/src/JackDriver.cpp +++ b/src/JackDriver.cpp @@ -114,13 +114,13 @@ JackDriver::detach() void JackDriver::destroy_all() { - FlowCanvas::ItemList modules = _app->canvas()->items(); // copy - for (FlowCanvas::ItemList::iterator m = modules.begin(); m != modules.end(); ++m) { + FlowCanvas::Canvas::Items modules = _app->canvas()->items(); // copy + for (FlowCanvas::Canvas::Items::iterator m = modules.begin(); m != modules.end(); ++m) { SharedPtr<FlowCanvas::Module> module = PtrCast<FlowCanvas::Module>(*m); if (!module) continue; - FlowCanvas::PortVector ports = module->ports(); // copy - for (FlowCanvas::PortVector::iterator p = ports.begin(); p != ports.end(); ++p) { + FlowCanvas::Module::Ports ports = module->ports(); // copy + for (FlowCanvas::Module::Ports::iterator p = ports.begin(); p != ports.end(); ++p) { boost::shared_ptr<PatchagePort> port = boost::dynamic_pointer_cast<PatchagePort>(*p); if ((port && port->type() == JACK_AUDIO) || (port->type() == JACK_MIDI)) { module->remove_port(port); diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 9682971..bfb067c 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -510,7 +510,8 @@ Patchage::status_msg(const string& msg) void Patchage::update_state() { - for (FlowCanvas::ItemList::iterator i = _canvas->items().begin(); i != _canvas->items().end(); ++i) { + for (FlowCanvas::Canvas::Items::iterator i = _canvas->items().begin(); + i != _canvas->items().end(); ++i) { SharedPtr<FlowCanvas::Module> module = PtrCast<FlowCanvas::Module>(*i); if (module) module->load_location(); diff --git a/src/Patchage.hpp b/src/Patchage.hpp index 69d44de..ed9cff3 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -54,7 +54,7 @@ public: #ifdef HAVE_ALSA AlsaDriver* alsa_driver() const { return _alsa_driver; } #endif -#if defined(HAVE_LASH) || defined(HAVE_JACK_DBUS) +#ifdef HAVE_LASH DBus* dbus() const { return _dbus; } #endif #ifdef PATCHAGE_JACK_SESSION @@ -117,11 +117,8 @@ protected: Glib::RefPtr<Gtk::Builder> _xml; -#if defined(HAVE_LASH) || defined(HAVE_JACK_DBUS) - DBus* _dbus; -#endif - #ifdef HAVE_LASH + DBus* _dbus; LashProxy* _lash_proxy; ProjectList* _project_list; Session* _session; diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index 813a45d..9cdcb7a 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -43,7 +43,7 @@ PatchageModule::update_menu() if (_type == InputOutput) { bool has_in = false; bool has_out = false; - for (FlowCanvas::PortVector::iterator p = _ports.begin(); p != _ports.end(); ++p) { + for (Ports::const_iterator p = _ports.begin(); p != _ports.end(); ++p) { if ((*p)->is_input()) { has_in = true; } else { @@ -128,6 +128,6 @@ PatchageModule::remove_port(boost::shared_ptr<FlowCanvas::Port> port) void PatchageModule::menu_disconnect_all() { - for (FlowCanvas::PortVector::iterator p = _ports.begin(); p != _ports.end(); ++p) + for (Ports::iterator p = _ports.begin(); p != _ports.end(); ++p) (*p)->disconnect_all(); } |