kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #41540
Re: wxWidgets Event Tables or Bind and lambdas
Hi,
> I prefer the way Simon has it formatted, since the lambda follows the
> general function formatting guidelines. I am indifferent to the grouping of
> arguments around it though, and the clang-format script would seem to
> prefer doing it this way:
> function( arg1, arg2, arg3, arg4, arg5,
> arg6, arg7 );
Yes, that's why I mentioned the "argument grouping" aspect: manually
inserted newlines should be kept, even if more tokens would fit the line.
One of the patches in my stack (remove superfluous casts) has
@@ -5268,11 +5268,13 @@ void ClipperOffset::DoOffset( double delta )
if( node.m_endtype == etOpenButt )
{
int j = len - 1;
- pt1 = IntPoint( (cInt) Round( m_srcPoly[j].X + m_normals[j].X *
- delta ), (cInt) Round( m_srcPoly[j].Y + m_normals[j].Y * delta ) );
+ pt1 = IntPoint(
+ Round( m_srcPoly[j].X + m_normals[j].X * delta ),
+ Round( m_srcPoly[j].Y + m_normals[j].Y * delta ) );
It's fairly obvious that the old state was done by an automatic tool, and
is pretty much the worst possible state.
Simon
References