Use a foreach.
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Nov 2018 22:53:43 +0000 (22:53 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 23 Nov 2018 22:53:43 +0000 (22:53 +0000)
src/lib/job_manager.cc

index 3a4d76bceda93249f62fcba7fde9bc5a2ba28043..44c81e725aafb8f439fa30eb066b7b840dfc84e7 100644 (file)
@@ -137,8 +137,8 @@ bool
 JobManager::errors () const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       for (list<shared_ptr<Job> >::const_iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
-               if ((*i)->finished_in_error ()) {
+       BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+               if (i->finished_in_error ()) {
                        return true;
                }
        }