[haiku-development] Re: BGroupLayout documentation inconsisency

  • From: Niels Sascha Reedijk <niels.reedijk@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 20 May 2011 20:14:24 +0200

Hi,

2011/5/20 John Scipione <jscipione@xxxxxxxxx>:
>
>
> On Fri, May 20, 2011 at 11:32 AM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:
>>
>> On Fri, May 20, 2011 at 11:04 AM, John Scipione <jscipione@xxxxxxxxx>
>> wrote:
>> > Can someone with a working knowledge of the Layout Kit (Ingo?) please
>> > respond on this.
>>
>> It's correct, because the first orientation names the enum type (c.f.
>>
>> http://dev.haiku-os.org/browser/haiku/trunk/headers/os/interface/InterfaceDefs.h#L185
>> ), while the second names the variable itself.
>
> Thank you all for the quick reply.
> So this valid C++ to use the same parameter name as the name of the type and
> therefore this is a doxygen bug that it is not able to interpret this
> correctly. It would be nice if someone could rename the variable name in the
> parameter like this though:
> BGroupLayout::BGroupLayout(orientation direction, float spacing)
>     :
>     BTwoDimensionalLayout(),
>     fOrientation(direction)
> {
>     SetSpacing(spacing);
> }
> A grep of the src/kits/interface/ directory shows a number of other places
> that repeated orientation variable this is used. 'direction' seems like a
> good variable name to me. And this is the Layout Kit so we are allowed to
> break stuff -- it says so right in the docs. :)

You should try to alter the parameter name in the .dox file. I think
it will override the real parameter name.

N>

Other related posts: