Menu

#467 Brace init formatting bad

closed-fixed
None
2024-12-17
2017-11-22
Beep6581
No

Hello

Is there a way to prevent astyle from fudging brace inits?

@@ -350,20 +354,20 @@ ToneCurveParams::ToneCurveParams() :
     method("Blend"),
     expcomp(0),
     curve{

-        DCT_Linear
-    },
-    curve2{
-        DCT_Linear
-    },
-    curveMode(ToneCurveParams::TcMode::STD),
-    curveMode2(ToneCurveParams::TcMode::STD),
-    brightness(0),
-    black(0),
-    contrast(0),
-    saturation(0),
-    shcompr(50),
-    hlcompr(0),
-    hlcomprthresh(33)
+    DCT_Linear
+},
+curve2{
+    DCT_Linear
+},
+curveMode(ToneCurveParams::TcMode::STD),
+          curveMode2(ToneCurveParams::TcMode::STD),
+          brightness(0),
+          black(0),
+          contrast(0),
+          saturation(0),
+          shcompr(50),
+          hlcompr(0),
+          hlcomprthresh(33)
 {
 }
style=1tbs
indent=spaces=4
indent-switches
break-blocks
pad-oper
convert-tabs
pad-header
unpad-paren

https://github.com/Beep6581/RawTherapee/issues/3715#issuecomment-346268169

Discussion

  • Beep6581

    Beep6581 - 2017-12-05

    Bump

     
  • Jim Pattee

    Jim Pattee - 2017-12-05

    You can disable formatting with
    http://astyle.sourceforge.net/astyle.html#_Disable_Formatting

    It may or may not be a viable solution depending on how many need to be disabled.

    If you request a fix I need to see the entire statement.
    This looks like an unusual format.

     
  • Jim Pattee

    Jim Pattee - 2018-01-31

    This will probably be fixed in the next release.
    There are other similar problems with initializers.

    Currently, there is no account on GitHub.

     
  • André Simon

    André Simon - 2024-01-21
    • status: open --> open-accepted
    • assigned_to: André Simon
     
  • André Simon

    André Simon - 2024-12-13
    • status: open-accepted --> closed-fixed
     
  • André Simon

    André Simon - 2024-12-13

    fixed in recent release (3.6.4)

     
  • w-peuker

    w-peuker - 2024-12-13

    @saalen Isn't 3.6.5 the last release ?

     
  • André Simon

    André Simon - 2024-12-14

    yes, but this bug was fixed before ;)

     
    • w-peuker

      w-peuker - 2024-12-17

      Thanks for the clarification.

       

Log in to post a comment.