Skip to content

Weird closing bracket formatting on array literals #61

@Devon7925

Description

@Devon7925
struct HeightData {
    float offset;
    float scale;
    float impact;
};

const HeightData height_data[] = {
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.2, 2.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.4, 7.0, 0.2),
    HeightData(0.6, 20.0, 0.5),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.8, 2.0, 0.35),
    HeightData(0.1, 1.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.0, 0.0, 0.0),
};

Formats to

struct HeightData {
    float offset;
    float scale;
    float impact;
};

const HeightData height_data[] = {
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.2, 2.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.4, 7.0, 0.2),
    HeightData(0.6, 20.0, 0.5),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.8, 2.0, 0.35),
    HeightData(0.1, 1.0, 0.35),
    HeightData(0.0, 0.0, 0.0),
    HeightData(0.0, 0.0, 0.0),
    };

This looks wrong to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions