diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-20 14:35:02 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-20 14:35:02 +0000 |
commit | 052a0785b5c2d2d90fc7d2eca1babe09aa526f14 (patch) | |
tree | 13982443e7c88e01446388209bcffe0bd0971225 /libs/ardour/graph.cc | |
parent | facd8b2d90c74195cd4ac5c1ef7f877b78cefec9 (diff) |
slightly more efficient implementation of Graph::in_process_thread()
git-svn-id: svn://localhost/ardour2/branches/3.0@11278 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/graph.cc')
-rw-r--r-- | libs/ardour/graph.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index 03ba4d969a..5b435884d4 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -597,10 +597,10 @@ Graph::process_one_route (Route* route) bool Graph::in_process_thread () const { - list<pthread_t>::const_iterator i = _thread_list.begin (); - while (i != _thread_list.end() && *i != pthread_self ()) { - ++i; + for (list<pthread_t>::const_iterator i = _thread_list.begin (); i != _thread_list.end(); ++i) { + if (*i == pthread_self()) { + return true; + } } - - return i != _thread_list.end (); + return false; } |