← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] CPolyLine -> SHAPE_POLY_SET refactor

 

Le 17/04/2017 à 08:41, Alejandro Garcia Montoro a écrit :
> Hi, guys!
> 
> Sorry for the late reply, Easter Week out of home.
> 
> 
> 2017-04-14 15:09 GMT+02:00 jp charras <jp.charras@xxxxxxxxxx <mailto:jp.charras@xxxxxxxxxx>>:
> 
> 
>     OK.
>     I reverted the change in seg.h (looking to me as a old seg.h version committed by mistake)
>     in my commit cbb5708c365025df67161a7fa8e29b3925e39741,
>     and updated a few comments.
> 
> 
> It was not an old version, I changed it. The reason behind the change was this comment in
> shape_line_chain.h, in Segment function:
> 
> Returns a segment referencing to the segment (index) in the line chain.
> Modifying ends of the returned segment will modify corresponding points in the line chain.
> 
> As well as this (maybe old?) one in SEG class:
> 
> These are references to an object the segment belongs to (e.g. a line chain)
> or references to locally stored points (m_a, m_b).
> 
> I understood that SEG class should reference the points passed, so I just modified the class.
> 
> I should have asked, sorry! Anyway, should we modify those comments to actually reflect what the
> code does?
> 
> Thanks for pointing this out and for the fix, JP.
> 
> Best,
> Alejandro

Well, I was thinking it was from an old version, because before rev
5a51d11b781eb34d8a46599a0c5731f44cdea414 (2014, may 15) SEG class was using references to points.

This rev changed to points stored locally.
But unfortunately, the comments were not modified and become incorrect (did not reflect what the new
code does).

In my commit cbb5708c365025df67161a7fa8e29b3925e39741 I tried to modify these comments, but I
certainly missed a few changes.

So please, feel free to fix incorrect comments to actually reflect what the code does.

Thanks.

-- 
Jean-Pierre CHARRAS


References