21 #ifndef GNASH_ALGORITHM_H 22 #define GNASH_ALGORITHM_H 44 template<
typename Container,
typename Predicate>
47 typedef typename Container::iterator iterator;
49 for (iterator
i = c.begin(),
e = c.end();
i !=
e; ) {
50 iterator stored =
i++;
51 if (
p(*stored)) c.erase(stored);
56 template<
typename T,
size_t N>
71 template<
typename T,
typename U>
75 typedef typename std::iterator_traits<T>::value_type value_type;
void EraseIf(Container &c, Predicate p)
Erase elements from an associative container based on a predicate.
Definition: GnashAlgorithm.h:45
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
Definition: GnashKey.h:126
Definition: GnashKey.h:149
T * result_type
Definition: GnashAlgorithm.h:33
Definition: GnashKey.h:166
size_t arraySize(T(&)[N])
Get the size of an array without passing a pointer by mistake.
Definition: GnashAlgorithm.h:58
Return a pointer to a type.
Definition: GnashAlgorithm.h:31
Definition: GnashKey.h:133
Definition: GnashKey.h:132
std::int32_t second
Definition: Date_as.cpp:93
Definition: GnashKey.h:162
Definition: GnashKey.h:155
Definition: GnashKey.h:151
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
Definition: GnashKey.h:95
void foreachSecond(T begin, T end, U op)
Call a functor on the second element of each element in a range.
Definition: GnashAlgorithm.h:73
result_type operator()(T &t)
Definition: GnashAlgorithm.h:34