@@ -45,7 +45,7 @@ void test_loop_counter_mod_in_side_effect() {
45
45
}
46
46
47
47
void test_loop_counter_reference_mod_in_condition () {
48
- auto loop = [](int & i) {
48
+ auto loop = [](int &i) {
49
49
for (; (i++ < 10 ); i++) { // NON_COMPLIANT
50
50
}
51
51
};
@@ -54,7 +54,7 @@ void test_loop_counter_reference_mod_in_condition() {
54
54
}
55
55
56
56
void test_loop_counter_reference_mod () {
57
- auto loop = [](int & i) {
57
+ auto loop = [](int &i) {
58
58
for (; i < 10 ; i++) { // COMPLIANT
59
59
}
60
60
};
@@ -63,7 +63,7 @@ void test_loop_counter_reference_mod() {
63
63
}
64
64
65
65
void test_loop_const_reference () {
66
- auto loop = []([[maybe_unused]] int const & i) {
66
+ auto loop = []([[maybe_unused]] int const &i) {
67
67
for (int i = 0 ; i < 10 ; i++) { // COMPLIANT
68
68
}
69
69
};
@@ -72,7 +72,7 @@ void test_loop_const_reference() {
72
72
}
73
73
74
74
void test_loop_counter_reference_mod_in_statement () {
75
- auto loop = [](int & i) {
75
+ auto loop = [](int &i) {
76
76
for (; (i < 10 ); i++) {
77
77
i++; // NON_COMPLIANT
78
78
}
@@ -81,17 +81,11 @@ void test_loop_counter_reference_mod_in_statement() {
81
81
loop (i);
82
82
}
83
83
84
- int const_reference (int const & i) {
85
- return i;
86
- }
84
+ int const_reference (int const &i) { return i; }
87
85
88
- int reference (int & i) {
89
- return i;
90
- }
86
+ int reference (int &i) { return i; }
91
87
92
- int copy (int i) {
93
- return i;
94
- }
88
+ int copy (int i) { return i; }
95
89
96
90
void test_pass_argument_by () {
97
91
for (int i = 0 ; i < 10 ; i++) {
0 commit comments