From 052a0785b5c2d2d90fc7d2eca1babe09aa526f14 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 20 Jan 2012 14:35:02 +0000 Subject: slightly more efficient implementation of Graph::in_process_thread() git-svn-id: svn://localhost/ardour2/branches/3.0@11278 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/graph.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libs/ardour/graph.cc') 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::const_iterator i = _thread_list.begin (); - while (i != _thread_list.end() && *i != pthread_self ()) { - ++i; + for (list::const_iterator i = _thread_list.begin (); i != _thread_list.end(); ++i) { + if (*i == pthread_self()) { + return true; + } } - - return i != _thread_list.end (); + return false; } -- cgit v1.2.3