[libsigcplusplus] Use {} with multiline for() blocks.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] Use {} with multiline for() blocks.
- Date: Thu, 31 Mar 2016 13:29:11 +0000 (UTC)
commit 2ec63aa8975ea9002fb7b85e1298a00b35089429
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Mar 31 15:24:59 2016 +0200
Use {} with multiline for() blocks.
sigc++/signal.h | 4 ++++
sigc++/trackable.cc | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/sigc++/signal.h b/sigc++/signal.h
index f880ddf..f1b2945 100644
--- a/sigc++/signal.h
+++ b/sigc++/signal.h
@@ -680,8 +680,10 @@ struct signal_emit<T_return, void, T_arg...>
temp_slot_list slots(impl->slots_);
iterator_type it = slots.begin();
for (; it != slots.end(); ++it)
+ {
if (!it->empty() && !it->blocked())
break;
+ }
if (it == slots.end())
{
@@ -723,8 +725,10 @@ struct signal_emit<T_return, void, T_arg...>
temp_slot_list slots(impl->slots_);
reverse_iterator_type it(slots.end());
for (; it != reverse_iterator_type(slots.begin()); ++it)
+ {
if (!it->empty() && !it->blocked())
break;
+ }
if (it == reverse_iterator_type(slots.begin()))
{
diff --git a/sigc++/trackable.cc b/sigc++/trackable.cc
index e74133a..d2a8990 100644
--- a/sigc++/trackable.cc
+++ b/sigc++/trackable.cc
@@ -106,8 +106,10 @@ trackable_callback_list::~trackable_callback_list()
clearing_ = true;
for (auto& callback : callbacks_)
+ {
if (callback.func_)
callback.func_(callback.data_);
+ }
}
void
@@ -127,8 +129,10 @@ trackable_callback_list::clear()
clearing_ = true;
for (auto& callback : callbacks_)
+ {
if (callback.func_)
callback.func_(callback.data_);
+ }
callbacks_.clear();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]