This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: TODO in PickPackageLine.cc
- From: Brian Dessent <brian at dessent dot net>
- To: Cygwin Apps <cygwin-apps at cygwin dot com>
- Date: Wed, 04 May 2005 03:41:20 -0700
- Subject: Re: TODO in PickPackageLine.cc
- References: <09eb01c5508f$52959f90$e6ec6f83@chimaera>
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