Author: aschnell
Date: Fri Jan 9 14:49:18 2009
New Revision: 54506
URL: http://svn.opensuse.org/viewcvs/yast?rev=54506&view=rev
Log:
- added ycp_not_equal_to
Modified:
trunk/core/libycp/src/YCPList.cc
trunk/core/libycp/src/YCPMap.cc
trunk/core/libycp/src/include/ycp/ycpless.h
Modified: trunk/core/libycp/src/YCPList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/YCPList.cc?rev=54506&r1=54505&r2=54506&view=diff
==============================================================================
--- trunk/core/libycp/src/YCPList.cc (original)
+++ trunk/core/libycp/src/YCPList.cc Fri Jan 9 14:49:18 2009
@@ -110,7 +110,7 @@
bool YCPListRep::contains (const YCPValue& value) const
{
- return find_if(begin(), end(), bind2nd(ycpequal_to(), value)) != end();
+ return find_if(begin(), end(), bind2nd(ycp_equal_to(), value)) != end();
}
Modified: trunk/core/libycp/src/YCPMap.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/YCPMap.cc?rev=54506&r1=54505&r2=54506&view=diff
==============================================================================
--- trunk/core/libycp/src/YCPMap.cc (original)
+++ trunk/core/libycp/src/YCPMap.cc Fri Jan 9 14:49:18 2009
@@ -62,7 +62,7 @@
// default constructor for YCPValue.
YCPMap::iterator pos = stl_map.lower_bound(key);
- if (pos == stl_map.end() || !pos->first->equal(key))
+ if (pos == stl_map.end() || ycp_not_equal_to()(pos->first, key))
{
// pos is just a hint but can avoid a second search through the map
stl_map.insert(pos, YCPMap::value_type(key, value));
Modified: trunk/core/libycp/src/include/ycp/ycpless.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/include/ycp/ycpless.h?rev=54506&r1=54505&r2=54506&view=diff
==============================================================================
--- trunk/core/libycp/src/include/ycp/ycpless.h (original)
+++ trunk/core/libycp/src/include/ycp/ycpless.h Fri Jan 9 14:49:18 2009
@@ -57,12 +57,12 @@
* Compares two YCPValues and returns true if they are equal, false otherwise.
* Optionally the comparison is locale aware.
*/
-class ycpequal_to : public std::binary_function