Skip to content

Commit a215270

Browse files
committed
style: update constructor initializer formatting for improved readability
1 parent 2e57950 commit a215270

File tree

5 files changed

+83
-13
lines changed

5 files changed

+83
-13
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BreakInheritanceList: AfterColon
2020
BreakStringLiterals: true
2121
ColumnLimit: 150
2222
CompactNamespaces: false
23-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
23+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
2424
ConstructorInitializerIndentWidth: 4
2525
ContinuationIndentWidth: 4
2626
Cpp11BracedListStyle: true

src/Geometries/ParamPoly3.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ ParamPoly3::ParamPoly3(double s0,
2424
double dV,
2525
bool pRange_normalized) :
2626
RoadGeometry(s0, x0, y0, hdg0, length, GeometryType_ParamPoly3),
27-
aU(aU), bU(bU), cU(cU), dU(dU), aV(aV), bV(bV), cV(cV), dV(dV), pRange_normalized(pRange_normalized)
27+
aU(aU),
28+
bU(bU),
29+
cU(cU),
30+
dU(dU),
31+
aV(aV),
32+
bV(bV),
33+
cV(cV),
34+
dV(dV),
35+
pRange_normalized(pRange_normalized)
2836
{
2937
if (!pRange_normalized)
3038
{

src/RoadMark.cpp

+28-5
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ RoadMarksLine::RoadMarksLine(std::string road_id,
1414
std::string name,
1515
std::string rule) :
1616
road_id(road_id),
17-
lanesection_s0(lanesection_s0), lane_id(lane_id), group_s0(group_s0), width(width), length(length), space(space), t_offset(t_offset),
18-
s_offset(s_offset), name(name), rule(rule)
17+
lanesection_s0(lanesection_s0),
18+
lane_id(lane_id),
19+
group_s0(group_s0),
20+
width(width),
21+
length(length),
22+
space(space),
23+
t_offset(t_offset),
24+
s_offset(s_offset),
25+
name(name),
26+
rule(rule)
1927
{
2028
}
2129

@@ -31,8 +39,16 @@ RoadMarkGroup::RoadMarkGroup(std::string road_id,
3139
std::string material,
3240
std::string lane_change) :
3341
road_id(road_id),
34-
lanesection_s0(lanesection_s0), lane_id(lane_id), width(width), height(height), s_offset(s_offset), type(type), weight(weight), color(color),
35-
material(material), lane_change(lane_change)
42+
lanesection_s0(lanesection_s0),
43+
lane_id(lane_id),
44+
width(width),
45+
height(height),
46+
s_offset(s_offset),
47+
type(type),
48+
weight(weight),
49+
color(color),
50+
material(material),
51+
lane_change(lane_change)
3652
{
3753
}
3854

@@ -46,7 +62,14 @@ RoadMark::RoadMark(std::string road_id,
4662
double width,
4763
std::string type) :
4864
road_id(road_id),
49-
lanesection_s0(lanesection_s0), lane_id(lane_id), group_s0(group_s0), s_start(s_start), s_end(s_end), t_offset(t_offset), width(width), type(type)
65+
lanesection_s0(lanesection_s0),
66+
lane_id(lane_id),
67+
group_s0(group_s0),
68+
s_start(s_start),
69+
s_end(s_end),
70+
t_offset(t_offset),
71+
width(width),
72+
type(type)
5073
{
5174
}
5275

src/RoadObject.cpp

+27-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,16 @@ RoadObjectRepeat::RoadObjectRepeat(double s0,
2020
double z_offset_start,
2121
double z_offset_end) :
2222
s0(s0),
23-
length(length), distance(distance), t_start(t_start), t_end(t_end), width_start(width_start), width_end(width_end), height_start(height_start),
24-
height_end(height_end), z_offset_start(z_offset_start), z_offset_end(z_offset_end)
23+
length(length),
24+
distance(distance),
25+
t_start(t_start),
26+
t_end(t_end),
27+
width_start(width_start),
28+
width_end(width_end),
29+
height_start(height_start),
30+
height_end(height_end),
31+
z_offset_start(z_offset_start),
32+
z_offset_end(z_offset_end)
2533
{
2634
}
2735

@@ -51,8 +59,23 @@ RoadObject::RoadObject(std::string road_id,
5159
std::string subtype,
5260
bool is_dynamic) :
5361
road_id(road_id),
54-
id(id), type(type), name(name), orientation(orientation), subtype(subtype), s0(s0), t0(t0), z0(z0), length(length), valid_length(valid_length),
55-
width(width), radius(radius), height(height), hdg(hdg), pitch(pitch), roll(roll), is_dynamic(is_dynamic)
62+
id(id),
63+
type(type),
64+
name(name),
65+
orientation(orientation),
66+
subtype(subtype),
67+
s0(s0),
68+
t0(t0),
69+
z0(z0),
70+
length(length),
71+
valid_length(valid_length),
72+
width(width),
73+
radius(radius),
74+
height(height),
75+
hdg(hdg),
76+
pitch(pitch),
77+
roll(roll),
78+
is_dynamic(is_dynamic)
5679
{
5780
}
5881

src/RoadSignal.cpp

+18-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,24 @@ RoadSignal::RoadSignal(std::string road_id,
2222
std::string unit,
2323
std::string text) :
2424
road_id(road_id),
25-
id(id), name(name), s0(s0), t0(t0), is_dynamic(is_dynamic), zOffset(zOffset), value(value), height(height), width(width), hOffset(hOffset),
26-
pitch(pitch), roll(roll), orientation(orientation), country(country), type(type), subtype(subtype), unit(unit), text(text)
25+
id(id),
26+
name(name),
27+
s0(s0),
28+
t0(t0),
29+
is_dynamic(is_dynamic),
30+
zOffset(zOffset),
31+
value(value),
32+
height(height),
33+
width(width),
34+
hOffset(hOffset),
35+
pitch(pitch),
36+
roll(roll),
37+
orientation(orientation),
38+
country(country),
39+
type(type),
40+
subtype(subtype),
41+
unit(unit),
42+
text(text)
2743
{
2844
}
2945

0 commit comments

Comments
 (0)