[Insight-developers] Style in your gerrit review code

Bill Lorensen bill.lorensen at gmail.com
Tue Jun 14 08:33:33 EDT 2011


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