diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-11 03:18:17 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-11 03:18:17 +0000 |
commit | 53bbac4eb676e27e001caf60b36a8f33e5aa9553 (patch) | |
tree | 4502631d4f49068a0d88b8157c223082dcd8a6f3 /libs/pbd/controllable.cc | |
parent | 2983f8de97412b4887394747abed59fa11a11cff (diff) |
fix compilation breakages from the last commit
git-svn-id: svn://localhost/ardour2/branches/3.0@6347 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/controllable.cc')
-rw-r--r-- | libs/pbd/controllable.cc | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/libs/pbd/controllable.cc b/libs/pbd/controllable.cc index fbbb4d6f25..35f7605541 100644 --- a/libs/pbd/controllable.cc +++ b/libs/pbd/controllable.cc @@ -24,6 +24,7 @@ #include "i18n.h" using namespace PBD; +using namespace std; sigc::signal<void,Controllable*> Controllable::Destroyed; sigc::signal<bool,Controllable*> Controllable::StartLearning; @@ -35,7 +36,7 @@ Glib::StaticRWLock Controllable::registry_lock = GLIBMM_STATIC_RW_LOCK_INIT; Controllable::Controllables Controllable::registry; Controllable::ControllablesByURI Controllable::registry_by_uri; -Controllable::Controllable (const std::string& name, const std::string& uri) +Controllable::Controllable (const string& name, const string& uri) : _name (name) , _uri (uri) , _touching (false) @@ -46,7 +47,7 @@ Controllable::Controllable (const std::string& name, const std::string& uri) void Controllable::add () { - Glib::RWLock::WriterLock lm (*registry_lock); + Glib::RWLock::WriterLock lm (registry_lock); registry.insert (this); if (!_uri.empty()) { @@ -62,7 +63,7 @@ Controllable::add () void Controllable::remove () { - Glib::RWLock::WriterLock lm (*registry_lock); + Glib::RWLock::WriterLock lm (registry_lock); for (Controllables::iterator i = registry.begin(); i != registry.end(); ++i) { if ((*i) == this) { @@ -71,7 +72,7 @@ Controllable::remove () } } - if (_uri) { + if (!_uri.empty()) { ControllablesByURI::iterator i = registry_by_uri.find (_uri); if (i != registry_by_uri.end()) { registry_by_uri.erase (i); @@ -82,11 +83,11 @@ Controllable::remove () } void -Controllable::set_uri (const std::string& new_uri) +Controllable::set_uri (const string& new_uri) { - Glib::RWLock::WriterLock lm (*registry_lock); + Glib::RWLock::WriterLock lm (registry_lock); - if (_uri) { + if (!_uri.empty()) { ControllablesByURI::iterator i = registry_by_uri.find (_uri); if (i != registry_by_uri.end()) { registry_by_uri.erase (i); @@ -106,7 +107,7 @@ Controllable::set_uri (const std::string& new_uri) Controllable* Controllable::by_id (const ID& id) { - Glib::RWLock::ReaderLock lm (*registry_lock); + Glib::RWLock::ReaderLock lm (registry_lock); for (Controllables::iterator i = registry.begin(); i != registry.end(); ++i) { if ((*i)->id() == id) { @@ -119,19 +120,19 @@ Controllable::by_id (const ID& id) Controllable* Controllable::by_uri (const string& uri) { - Glib::RWLock::ReaderLock lm (*registry_lock); + Glib::RWLock::ReaderLock lm (registry_lock); ControllablesByURI::iterator i; - if ((i = registry_by_ui.find (uri)) != registry_by_uri.end()) { + if ((i = registry_by_uri.find (uri)) != registry_by_uri.end()) { return i->second; } return 0; } Controllable* -Controllable::by_name (const std::string& str) +Controllable::by_name (const string& str) { - Glib::RWLock::ReaderLock lm (*registry_lock); + Glib::RWLock::ReaderLock lm (registry_lock); for (Controllables::iterator i = registry.begin(); i != registry.end(); ++i) { if ((*i)->_name == str) { |