From: Jeff D. <jef...@gm...> - 2009-10-23 11:43:30
|
In stage.hh, class std_point_int_t { ... bool operator<( const stg_point_int_t& other ) const { return ((x < other.x) || (y < other.y) ); } ... This isn't consistent - for 2 points A, B it works when A's coordinates are both larger than B's or vice-versa, but when each has one coordinate bigger than the corresponding other's, A can be < B and simultaneously B < A. Eg, A is (1, 5), B is (5, 1): is A < B ? A.x < B.x, so, yes. is B < A ? B.x is not < A.x, but it's an 'or' so we get another chance, B.y < A.y so, B < A, also. The patch uses the x coordinate, unless A.x == B.x, when it uses y. |