Mercurial > hg > octave-lyh
changeset 17206:81f3b09e3e6e
base-list.h: Switch to STL remove_if rather than Sun Compiler workaround.
* liboctave/util/base-list.h: Switch to STL remove_if rather than Sun Studio
Compiler workaround.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 07 Aug 2013 13:29:34 -0700 |
parents | fbee0d312af5 |
children | 9deb214ae9d5 |
files | liboctave/util/base-list.h |
diffstat | 1 files changed, 16 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/util/base-list.h +++ b/liboctave/util/base-list.h @@ -49,24 +49,28 @@ template <class P> void remove_if (P pred) { + lst.remove_if (pred); + + // FIXME: kluge removed 8/7/13. Eventually this commented + // code should be deleted. + // + // FIXME: this kluge should be removed at some point. // We would like to simply call // // lst.remove_if (pred); // // but the Sun Studio compiler chokes on that. // - // FIXME -- this kluge should be removed at some point. - - iterator b = lst.begin (); - iterator e = lst.end (); - while (b != e) - { - iterator n = b; - n++; - if (pred (*b)) - lst.erase (b); - b = n; - } + // iterator b = lst.begin (); + // iterator e = lst.end (); + // while (b != e) + // { + // iterator n = b; + // n++; + // if (pred (*b)) + // lst.erase (b); + // b = n; + // } } void clear (void) { lst.clear (); }