Go to the documentation of this file.
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;
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
result_type operator()(T &t)
Definition: GnashAlgorithm.h:34
@ U
Definition: GnashKey.h:133
@ T
Definition: GnashKey.h:132
size_t arraySize(T(&)[N])
Get the size of an array without passing a pointer by mistake.
Definition: GnashAlgorithm.h:58
@ i
Definition: GnashKey.h:155
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
std::int32_t second
Definition: Date_as.cpp:93
@ t
Definition: GnashKey.h:166
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
T * result_type
Definition: GnashAlgorithm.h:33
@ p
Definition: GnashKey.h:162
@ _1
Definition: GnashKey.h:95
void EraseIf(Container &c, Predicate p)
Erase elements from an associative container based on a predicate.
Definition: GnashAlgorithm.h:45
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
@ c
Definition: GnashKey.h:149
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
@ N
Definition: GnashKey.h:126
@ e
Definition: GnashKey.h:151
Return a pointer to a type.
Definition: GnashAlgorithm.h:32