Skip to content

Commit e970725

Browse files
committed
Replace for loops with std::slist::iterator into equivalent for-each loop in libs/
1 parent 23e31f0 commit e970725

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libs/pbd/pbd/stl_delete.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ template<class T> /*LIBPBD_API*/ void list_delete (std::list<T *> *l)
5757
#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
5858
template<class T> /*LIBPBD_API*/ void slist_delete (std::slist<T *> *l)
5959
{
60-
typename std::slist<T *>::iterator i;
61-
62-
for (i = l->begin(); i != l->end(); i++) {
60+
for (T*& i : *l) {
6361
delete (*i);
6462
}
6563

0 commit comments

Comments
 (0)