AngusJohnson / Clipper2

Polygon Clipping and Offsetting - C++, C# and Delphi
Boost Software License 1.0
1.45k stars 266 forks source link

IntersectEdges return value never used? #798

Closed philstopford closed 5 months ago

philstopford commented 6 months ago

In looking through the warnings from Rider, one thing that puzzles me is that IntersectEdges in Clipper.Engine returns a OutPt type, but this return value is never used in any of the call sites. Is that expected?

philstopford commented 6 months ago

To flesh this out, there are return values throughout this method (e.g. return null), but since the call sites never assign or otherwise use the return value, these seem to be meaningless. I am uncertain, though, as clearly there was a plan at some point to return a value because there's a resultOp which has a value assigned and returned, but it's not used.

philstopford commented 6 months ago

@AngusJohnson : Just curious about this one. I can send a PR in case the return value is never used, but given the method name and so on, I'm not really sure you meant to discard it.

philstopford commented 5 months ago

I casually took a look at the C++ code and it seems the return value is declared, but not used there as well. I'm trying to understand if this call then does much of anything.

AngusJohnson commented 5 months ago

Hi Phil. Yes it's probably obsolete code. And I'm not ignoring you 😱, I just haven't had the head space to look at this yet.