TODO in PickPackageLine.cc
Brian Dessent
brian@dessent.net
Wed May 4 10:38:00 GMT 2005
Max Bowsher wrote:
>
> I recently added a TODO to PickPackageLine.cc, marking a piece of code which
> seems a little suspect to me.
> I did try to follow up on my suspicion, but got lost in the dependency
> processing code.
> I'll have another go at it later, but I'd appreciate any input from others.
My guess was that it was a typo that was never caught since there was
the second name of the function with the default arg. And most people
use TRUST_CURR anyway so it's a corner case. I see no reason why it
shouldn't be
return pkg.set_requirements (theView.deftrust);
There's something similar going on with
packageversion::set_requirements(). In that case it too has two
versions of the function, and one of them has a default argument. That
means there are (or were before you starting cleaning) six ways to
invoke this function name. And only slight difference in class name -
"packagemeta" and "packageversion". Seems like that is just asking for
mistakes.
Obviously whoever did it that way had a reason, but it seems way too
open-ended for me. Maybe I'm just not used to an idiom.
Brian
More information about the Cygwin-apps
mailing list