[Zope-Checkins] CVS: Zope/lib/python/BTrees - SetOpTemplate.c:1.19
Tim Peters
tim.one@comcast.net
Mon, 3 Jun 2002 13:45:09 -0400
Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv29247
Modified Files:
SetOpTemplate.c
Log Message:
nextKeyAsSet(): Simplified the code. Added a new test to exercise it.
=== Zope/lib/python/BTrees/SetOpTemplate.c 1.18 => 1.19 ===
nextKeyAsSet(SetIteration *i)
{
- /* XXX Looks like this block could be replaced by
- * XXX i->position = i->position == 0 ? 1 : -1;
- */
- if (i->position >= 0)
- {
- if (i->position < 1)
- {
- i->position ++;
- }
- else
- i->position = -1;
- }
+ i->position = i->position == 0 ? 1 : -1;
return 0;
}
#endif