[Insight-developers] Style in your gerrit review code

Bill Lorensen bill.lorensen at gmail.com
Tue Jun 14 10:17:21 EDT 2011


Peter,

Is your KWStyle up-to-date?

Bill

On Tue, Jun 14, 2011 at 9:26 AM, Lamb, Peter (GE Global Research)
<Peter.Lamb at ge.com> wrote:
> Hi Bill,
>
> Many thanks for your e-mail.  I found that for some header files, KWStyle actually threw errors (for example, one line with a brace was indented only two but should be indented four), and for other files, no errors were thrown.  So I modified the files that KWStyle threw errors on.  But I'll go through and undo this particular type of change I made so everything is consistent with the style convention you've outlined below.
>
> Thanks again!
>
> Peter
>
> Peter Lamb
> GE Global Research, KW-C209
> Diagnostics & Biomedical Technologies
> Biomedical Image Analysis Lab
>
> T  +1 518 387 6024
> M +1 917 741 9233
> peter.lamb at ge.com
> www.gehealthcare.com
>
> One Research Circle
> Niskayuna, NY 12309 USA
> General Electric Company
>
> GE imagination at work
>
>
> -----Original Message-----
> From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Sent: Tuesday, June 14, 2011 8:34 AM
> To: Lamb, Peter (GE Global Research)
> Cc: Insight Developers
> Subject: Style in your gerrit review code
>
> Peter,
>
> Thanks for reviewing the code in gerrit.
>
> I noticed that in .h files you are indenting the {}'s for method bodies.
>
> The indentation style was changed a while ago to be consistent with the indentation in the .txx files. Unfortunately, KWStyle seems to accept either.
>
> For example this original code in
> Core/ImageAdaptors/include/itkRGBToVectorPixelAccessor.h
>  inline void Set(InternalType & output, const ExternalType & input) const
>  {
>    output[0] = input[0];
>    output[1] = input[1];
>    output[2] = input[2];
>  }
>
> should NOT be changed to:
>  inline void Set(InternalType & output, const ExternalType & input) const
>    {
>    output[0] = input[0];
>    output[1] = input[1];
>    output[2] = input[2];
>    }
>
> Bill
>


More information about the Insight-developers mailing list