# HG changeset patch # User Rik # Date 1375907374 25200 # Node ID 81f3b09e3e6e32cc8087f2337b2853c75c6b3d43 # Parent fbee0d312af5a670f95cea419f93fa62660aba8d 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. diff --git a/liboctave/util/base-list.h b/liboctave/util/base-list.h --- a/liboctave/util/base-list.h +++ b/liboctave/util/base-list.h @@ -49,24 +49,28 @@ template 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 (); }