[Aptitude-svn-commit] r3978 - in branches/aptitude-0.3/aptitude: .
src/generic
Daniel Burrows
dburrows at costa.debian.org
Mon Aug 29 16:50:36 UTC 2005
Author: dburrows
Date: Mon Aug 29 16:50:33 2005
New Revision: 3978
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/generic/immset.h
Log:
Add a routine to test if a value is in the domain of a mapping.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Mon Aug 29 16:50:33 2005
@@ -1,3 +1,10 @@
+2005-08-29 Daniel Burrows <dburrows at debian.org>
+
+ * src/generic/immset.h:
+
+ Add a convenience routuine to check if a value is in the domain
+ of a mapping.
+
2005-08-28 Daniel Burrows <dburrows at debian.org>
* src/generic/apt.cc:
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 Mon Aug 29 16:50:33 2005
@@ -714,6 +714,12 @@
{
contents.erase(binding_type(k, Val()));
}
+
+ /** \return \b true if k is in the domain of this mapping. */
+ bool domain_contains(const Key &k) const
+ {
+ return contents.contains(binding_type(k, Val()));
+ }
};
};
More information about the Aptitude-svn-commit
mailing list