Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54413 - /trunk/core/libycp/src/YCPBuiltinList.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 07 Jan 2009 11:19:58 -0000
  • Message-id: <E1LKWS7-0004iI-18@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Jan 7 12:19:58 2009
New Revision: 54413

URL: http://svn.opensuse.org/viewcvs/yast?rev=54413&view=rev
Log:
- use YCPList member function contains in builtin contains

Modified:
trunk/core/libycp/src/YCPBuiltinList.cc

Modified: trunk/core/libycp/src/YCPBuiltinList.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/core/libycp/src/YCPBuiltinList.cc?rev=54413&r1=54412&r2=54413&view=diff
==============================================================================
--- trunk/core/libycp/src/YCPBuiltinList.cc (original)
+++ trunk/core/libycp/src/YCPBuiltinList.cc Wed Jan 7 12:19:58 2009
@@ -144,20 +144,7 @@
* @usage contains ([1, 2, 5], 2) -> true
*/

- if (list.isNull ())
- {
- return YCPNull ();
- }
-
- for (int i = 0; i < list->size (); i++)
- {
- if (list->value (i)->equal (value))
- {
- return YCPBoolean (true);
- }
- }
-
- return YCPBoolean (false);
+ return YCPBoolean(list->contains(value));
}



--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages