We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22a9b49 commit 4c67991Copy full SHA for 4c67991
libs/pbd/pbd/stl_delete.h
@@ -57,9 +57,7 @@ template<class T> /*LIBPBD_API*/ void list_delete (std::list<T *> *l)
57
#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
58
template<class T> /*LIBPBD_API*/ void slist_delete (std::slist<T *> *l)
59
{
60
- typename std::slist<T *>::iterator i;
61
-
62
- for (i = l->begin(); i != l->end(); i++) {
+ for (T*& i : *l) {
63
delete (*i);
64
}
65
0 commit comments