xbmc/xbmc — pull request #814 by jmarshallnz (2012-03-26 03:47:17+00:00)
Title: Fix addonversion equals

Commit f6ec198de2f4f15d14a3f05f70383071ad43b208 notes an inconsistency in the way AddonVersion comparisons are done.

In particular, note that 1.0 != 1.00 yet 1.0 is neither less than or greater than 1.00.

Similarly, 1.01 != 1.1, yet 1.1 is neither less than or greater than 1.01.

The problem is due to AddonVersion::operator==() performing lexicographical comparisons rather than the numerical comparisons done in AddonVersion::operator<().

Given that AddonVersion derives from boost::totally_ordered this is just plain wrong, as clearly it's not totally ordered.

We fix this by ensuring operator==() performs the same operations as operator<()