Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54503 - /trunk/core/libycp/src/YCPBuiltinList.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Fri, 09 Jan 2009 13:20:52 -0000
  • Message-id: <E1LLHIC-0000no-Dn@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Fri Jan 9 14:20:52 2009
New Revision: 54503

URL: http://svn.opensuse.org/viewcvs/yast?rev=54503&view=rev
Log:
- use YCPList.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=54503&r1=54502&r2=54503&view=diff
==============================================================================
--- trunk/core/libycp/src/YCPBuiltinList.cc (original)
+++ trunk/core/libycp/src/YCPBuiltinList.cc Fri Jan 9 14:20:52 2009
@@ -212,18 +212,8 @@

// Already contained? I know, this has an _awful_ complexity.
// We need to introduce an order on YCPValueRep to solve the
problem.
- bool contained = false;

- for (int a = 0; a < newlist->size (); a++)
- {
- if (newlist->value (a)->equal (to_insert))
- {
- contained = true;
- break;
- }
- }
-
- if (!contained)
+ if (!newlist->contains(to_insert))
newlist->add (to_insert);
}
}

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

< Previous Next >
This Thread
  • No further messages