Skip to content

Commit 05b5a81

Browse files
committed
C++11: signal: Use auto for iterators.
1 parent 67c84a3 commit 05b5a81

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sigc++/macros/signal.h.m4

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ FOR(1, $1,[
138138
//This avoids a leak on MSVC++ - see http://bugzilla.gnome.org/show_bug.cgi?id=306249
139139
{
140140
temp_slot_list slots(impl->slots_);
141-
iterator_type it = slots.begin();
141+
auto it = slots.begin();
142142
for (; it != slots.end(); ++it)
143143
if (!it->empty() && !it->blocked()) break;
144144
@@ -234,7 +234,7 @@ FOR(1, $1,[
234234
signal_exec exec(impl);
235235
temp_slot_list slots(impl->slots_);
236236
237-
for (iterator_type it = slots.begin(); it != slots.end(); ++it)
237+
for (auto it = slots.begin(); it != slots.end(); ++it)
238238
{
239239
if (it->empty() || it->blocked())
240240
continue;
@@ -262,7 +262,7 @@ FOR(1, $1,[
262262
typedef std::reverse_iterator<signal_impl::iterator_type, std::random_access_iterator_tag,
263263
slot_base, slot_base&, slot_base*, std::ptrdiff_t> reverse_iterator_type;
264264
#endif
265-
for (reverse_iterator_type it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
265+
for (auto it = reverse_iterator_type(slots.end()); it != reverse_iterator_type(slots.begin()); ++it)
266266
{
267267
if (it->empty() || it->blocked())
268268
continue;
@@ -1126,7 +1126,7 @@ struct slot_reverse_iterator_buf
11261126

11271127
result_type operator*() const
11281128
{
1129-
iterator_type __tmp(i_);
1129+
auto __tmp(i_);
11301130
--__tmp;
11311131
if (!__tmp->empty() && !__tmp->blocked() && !invoked_)
11321132
{
@@ -1205,7 +1205,7 @@ struct slot_reverse_iterator_buf<T_emitter, void>
12051205

12061206
void operator*() const
12071207
{
1208-
iterator_type __tmp(i_);
1208+
auto __tmp(i_);
12091209
--__tmp;
12101210
if (!__tmp->empty() && !__tmp->blocked() && !invoked_)
12111211
{

0 commit comments

Comments
 (0)