Problem with a User::QuickSort on Series60.
I want to sort an array containg pointers to some of my own CBase-derived objects. And I want to do a comparision by several fields in those objects. Ok, I need a TKey-derived class which then compares necessary things. And also I inherit my list-class from TSwap to be able to swap items.

User::QuickSort( <count>, mykey, *mylistobject );

What happens now is that right after the function call the Swap() function is called with arguments to swap 1st and 2nd. Even no comparision has not being made yet. Really weird. After that I get several comparisions, including the ones to compare for example 2nd item with 2nd. Same goes for swap: swap 2nd with 2nd. Even more weird. Is that what we call an algorithm?

Important to mention that the result is correct though but come on ppl, it's a phone and I don't have processor to waste on that extra comparision for a starter!

Where am I wrong?