Author: aschnell
Date: Wed Jan 7 12:26:10 2009
New Revision: 54416
URL: http://svn.opensuse.org/viewcvs/yast?rev=54416&view=rev
Log:
- use ycpless instead of own functions
Modified:
trunk/core/libycp/src/YCPBuiltinList.cc
trunk/core/libycp/src/YCPList.cc
Modified: trunk/core/libycp/src/YCPBuiltinList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/YCPBuiltinList.cc?rev=54416&r1=54415&r2=54416&view=diff
==============================================================================
--- trunk/core/libycp/src/YCPBuiltinList.cc (original)
+++ trunk/core/libycp/src/YCPBuiltinList.cc Wed Jan 7 12:26:10 2009
@@ -1267,12 +1267,6 @@
return YCPNull();
}
-bool haha(YCPValue a, YCPValue b)
-{
- YCPOrder comp = a->compare (b);
- return comp == YO_LESS;
-}
-
static YCPValue
s_difference(const YCPList& a, const YCPList& b)
@@ -1282,7 +1276,7 @@
vector<YCPValue> r;
back_insert_iterator< vector<YCPValue> > bii(r);
- set_difference(a->begin(), a->end(), b->begin(), b->end(), bii, haha);
+ set_difference(a->begin(), a->end(), b->begin(), b->end(), bii, ycpless());
YCPList ret;
for(vector<YCPValue>::iterator it = r.begin(); it != r.end(); it++)
@@ -1299,7 +1293,7 @@
vector<YCPValue> r;
back_insert_iterator< vector<YCPValue> > bii(r);
- set_symmetric_difference(a->begin(), a->end(), b->begin(), b->end(), bii, haha);
+ set_symmetric_difference(a->begin(), a->end(), b->begin(), b->end(), bii, ycpless());
YCPList ret;
for(vector<YCPValue>::iterator it = r.begin(); it != r.end(); it++)
@@ -1316,7 +1310,7 @@
vector<YCPValue> r;
back_insert_iterator< vector<YCPValue> > bii(r);
- set_intersection(a->begin(), a->end(), b->begin(), b->end(), bii, haha);
+ set_intersection(a->begin(), a->end(), b->begin(), b->end(), bii, ycpless());
YCPList ret;
for(vector<YCPValue>::iterator it = r.begin(); it != r.end(); it++)
@@ -1333,7 +1327,7 @@
vector<YCPValue> r;
back_insert_iterator< vector<YCPValue> > bii(r);
- set_union(a->begin(), a->end(), b->begin(), b->end(), bii, haha);
+ set_union(a->begin(), a->end(), b->begin(), b->end(), bii, ycpless());
YCPList ret;
for(vector<YCPValue>::iterator it = r.begin(); it != r.end(); it++)
@@ -1349,7 +1343,7 @@
{ "find", "flex (variable <flex>, const list <flex>, const block <boolean>)", (void *)l_find, DECL_SYMBOL|DECL_FLEX },
{ "prepend", "list <flex> (const list <flex>, const flex)", (void *)l_prepend, DECL_FLEX },
{ "contains", "boolean (const list <flex>, const flex)", (void *)l_contains, DECL_FLEX },
- { "setcontains","boolean (const list <flex>, const flex)", (void *)l_setcontains, DECL_FLEX },
+ { "setcontains","boolean (const list <flex>, const flex)", (void *)l_setcontains, DECL_FLEX },
{ "union", "list <any> (const list <any>, const list <any>)", (void *)l_unionlist },
{ "+", "list <flex> (const list <flex>, const list <flex>)", (void *)l_unionlist, DECL_FLEX },
{ "merge", "list <any> (const list <any>, const list <any>)", (void *)l_mergelist },
Modified: trunk/core/libycp/src/YCPList.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/YCPList.cc?rev=54416&r1=54415&r2=54416&view=diff
==============================================================================
--- trunk/core/libycp/src/YCPList.cc (original)
+++ trunk/core/libycp/src/YCPList.cc Wed Jan 7 12:26:10 2009
@@ -10,7 +10,7 @@
| (C) SuSE GmbH |
\----------------------------------------------------------------------/
- File: YCPList.cc
+ File: YCPList.cc
Authors: Mathias Kettner