17 May
2017
17 May
'17
9:55 a.m.
Den 16-05-2017 kl. 19:41 skrev Joaquin M López Muñoz via Boost:
El 16/05/2017 a las 16:20, Thorsten Ottosen via Boost escribió:
Or do you need sx and sy? But also, once all the segments have been compared in the loop, you know the x.size() == y.size() ...
Not so: consider the case where y has a segment (let's call it seg) which is not present in x; in this case the for loop would pass succesfully and seg wouldn't have been hit, and we'd thus erroneously return true. That's why we need the extra check on size. In other words, we can't determine equality by only going through x's segments.
right.