[Aptitude-svn-commit] r4001 - in branches/aptitude-0.3/aptitude: .
src/generic
Daniel Burrows
dburrows at costa.debian.org
Tue Aug 30 20:06:44 UTC 2005
Author: dburrows
Date: Tue Aug 30 20:06:41 2005
New Revision: 4001
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/immset.h
Log:
Don't automatically split pairs in imm::map::for_each.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Aug 30 20:06:41 2005
@@ -1,5 +1,9 @@
2005-08-30 Daniel Burrows <dburrows at debian.org>
+ * src/generic/immset.h:
+
+ Don't automatically split pairs in imm::map::for_each.
+
* src/generic/util.h:
Also add project1st.
Modified: branches/aptitude-0.3/aptitude/src/generic/immset.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/immset.h (original)
+++ branches/aptitude-0.3/aptitude/src/generic/immset.h Tue Aug 30 20:06:41 2005
@@ -713,25 +713,6 @@
typedef typename mapping_type::node node;
private:
- /** An operator that unpacks pairs and passes them to the real
- * operator.
- */
- template<typename Op>
- struct map_for_each
- {
- const Op &realop;
- public:
- map_for_each(const Op &_realop)
- :realop(_realop)
- {
- }
-
- void operator()(const std::pair<Key, Val> &p) const
- {
- realop(p.first, p.second);
- }
- };
-
mapping_type contents;
public:
@@ -749,12 +730,12 @@
/** Apply the given operator to each binding in this map.
*
- * \param o a function object of two arguments (key, val).
+ * \param o a function object that takes a pair (key, val).
*/
template<typename Op>
void for_each(const Op &o) const
{
- return contents.for_each(map_for_each<Op>(o));
+ return contents.for_each(o);
}
mapping_type get_bindings() const
More information about the Aptitude-svn-commit
mailing list