[libsigcplusplus] signal: Use a range-based for() loop.



commit 246889ae348198cd0132c8d10786c6cb4963dc3e
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Apr 1 18:22:29 2016 +0200

    signal: Use a range-based for() loop.

 sigc++/signal.h |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/sigc++/signal.h b/sigc++/signal.h
index 07574e7..52b9ca3 100644
--- a/sigc++/signal.h
+++ b/sigc++/signal.h
@@ -775,11 +775,12 @@ struct signal_emit<void, void, T_arg...>
     signal_exec exec(impl);
     temp_slot_list slots(impl->slots_);
 
-    for (iterator_type it = slots.begin(); it != slots.end(); ++it)
+    for (const auto& slot : slots)
     {
-      if (it->empty() || it->blocked())
+      if (slot.empty() || slot.blocked())
         continue;
-      (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a...);
+
+      (reinterpret_cast<call_type>(slot.rep_->call_))(slot.rep_, _A_a...);
     }
   }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]