Skip to content

Use BreakBeforeBraces: Linux for clang-format#8212

Closed
homm wants to merge 1 commit intopython-pillow:mainfrom
uploadcare:clang-format-linux-braces
Closed

Use BreakBeforeBraces: Linux for clang-format#8212
homm wants to merge 1 commit intopython-pillow:mainfrom
uploadcare:clang-format-linux-braces

Conversation

@homm
Copy link
Copy Markdown
Member

@homm homm commented Jul 7, 2024

Rationale

It's extremely hard to distinguish function arguments from local variables:

void static inline ImagingLineBoxBlur32(
    pixel *lineOut,
    pixel *lineIn,
    int lastx,
    int radius,
    int edgeA,
    int edgeB,
    UINT32 ww,
    UINT32 fw) {
    int x;
    UINT32 acc[4];
    UINT32 bulk[4];
static union hist_extrema *
parse_histogram_extremap(
    ImagingObject *self, PyObject *extremap, union hist_extrema *ep) {
    int i0, i1;
    double f0, f1;

After proposition:

void static inline ImagingLineBoxBlur32(
    pixel *lineOut,
    pixel *lineIn,
    int lastx,
    int radius,
    int edgeA,
    int edgeB,
    UINT32 ww,
    UINT32 fw)
{
    int x;
    UINT32 acc[4];
    UINT32 bulk[4];
static union hist_extrema *
parse_histogram_extremap(
    ImagingObject *self, PyObject *extremap, union hist_extrema *ep)
{
    int i0, i1;
    double f0, f1;

@radarhere
Copy link
Copy Markdown
Member

#8067 would seem like an alternative suggestion. I'm guessing you prefer this?

@homm
Copy link
Copy Markdown
Member Author

homm commented Jul 8, 2024

I'm guessing you prefer this?

Actually, no! I haven't seen #8067 and like it more.

@homm homm closed this Jul 8, 2024
@homm homm deleted the clang-format-linux-braces branch July 8, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants