What version of the product are you using? On what operating system?
0.6 on Windows XP SP2/SP3
Please provide any additional information below.
The skipPositionsToNext function has no local/internal variables/values.
Therefore, it probably does not require recursion at all.
How about a clean loop?
*********************************************************
/**
* increments internal pointers to next available card pair.
* Returns true if next pair is found.
* Returns false if no next pair is available
*/
skipPositionsToNext: function() {
retval: true;
for (;;)
{
this.currentSearchPairPosition++;
if (this.currentSearchPairPosition == this.vcards.length) {
this.currentSearchPairPosition = 0;
this.currentSearchPosition++;
if (this.currentSearchPosition >= this.vcards.length) {
// end of material.
//alert('end of material.');
retval = false;
break;
}
}
if !(
(this.currentSearchPosition == this.currentSearchPairPosition) ||
this.deletedCards[this.currentSearchPosition] ||
this.deletedCards[this.currentSearchPairPosition] ||
this.duplicateCache[this.currentSearchPosition+'_'+this.currentSearchPairPositio
n]
)
{
break;
}
}
return retval;
},
***************************************************
Steven
Original issue reported on code.google.com by sger...@gerber-systems.com on 13 Oct 2008 at 7:24
Original issue reported on code.google.com by
sger...@gerber-systems.com
on 13 Oct 2008 at 7:24