Skip to content

Commit 0a30db8

Browse files
author
Daniel Kroening
authored
Merge pull request #554 from rjmunro/feature/lint-fixes
cpplint fixes
2 parents 4cfcb87 + addc5ee commit 0a30db8

File tree

295 files changed

+1801
-1801
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

295 files changed

+1801
-1801
lines changed

regression/cpp-from-CVS/Assignment1/main.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@ struct A { int i;};
22

33
struct B
44
{
5-
int i;
6-
B& operator = (const B& b)
7-
{
8-
i = b.i;
9-
return *this;
10-
}
5+
int i;
6+
B& operator = (const B& b)
7+
{
8+
i = b.i;
9+
return *this;
10+
}
1111
};
1212

1313
A funcA()
1414
{
15-
A a;
16-
a.i = 10;
17-
return a;
15+
A a;
16+
a.i = 10;
17+
return a;
1818
}
1919

2020

2121
B funcB()
2222
{
23-
B b;
24-
b.i = 10;
25-
return b;
23+
B b;
24+
b.i = 10;
25+
return b;
2626
}
2727

2828
int main()
2929
{
30-
A a;
31-
a.i = 20;
32-
assert((funcA() = a).i == 20); // legal
30+
A a;
31+
a.i = 20;
32+
assert((funcA() = a).i == 20); // legal
3333

34-
B b;
35-
b.i = 20;
36-
assert((funcB() = b).i == 20); // legal
34+
B b;
35+
b.i = 20;
36+
assert((funcB() = b).i == 20); // legal
3737
}

regression/cpp-from-CVS/Comma_Operator1/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ int main()
22
{
33
int s=0;
44
int t=0;
5-
t=(s=3,s+2);
5+
t=(s=3, s+2);
66
assert(s==3);
77
assert(t==5);
88
}

regression/cpp-from-CVS/ConditionalExpression2/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ char b[2];
33

44
int main()
55
{
6-
char* c = true ? a : b;
7-
assert(*c == a[0]);
8-
return 0;
6+
char* c = true ? a : b;
7+
assert(*c == a[0]);
8+
return 0;
99
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
class A
22
{
3-
public:
4-
int a;
5-
A(int a):a(a){}
3+
public:
4+
int a;
5+
A(int a):a(a){}
66
};
77

88

99
A f()
1010
{
11-
return A(0);
11+
return A(0);
1212
}
1313

14-
int main(){}
14+
int main() {}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
struct A
22
{
3-
A(){};
3+
A(){};
44
};
55

66
int main()
77
{
8-
A a;
9-
a.A();
8+
A a;
9+
a.A();
1010
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
struct A
22
{
3-
int i;
4-
A():i(10){}
5-
private:
6-
A(const A& a); // disabled
3+
int i;
4+
A():i(10) {}
5+
private:
6+
A(const A& a); // disabled
77
};
88

99

1010
class B: A {
11-
public:
12-
B(){};
13-
int get_i(){return i;}
14-
private:
15-
B(B& b); // disabled
11+
public:
12+
B(){};
13+
int get_i() {return i;}
14+
private:
15+
B(B& b); // disabled
1616
};
1717

1818
int main()
1919
{
20-
B b;
21-
assert(b.get_i() == 10);
20+
B b;
21+
assert(b.get_i() == 10);
2222
}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
int g;
22
class A {
3-
public:
4-
A(int i){g=i;};
5-
private:
6-
A();
3+
public:
4+
A(int i){g=i;};
5+
private:
6+
A();
77
};
88

99
class B: A {
10-
public:
11-
typedef A base_type;
12-
typedef B this_type;
13-
B():base_type(10){}
14-
B(const this_type& b): A(20) {g++;}
10+
public:
11+
typedef A base_type;
12+
typedef B this_type;
13+
B():base_type(10) {}
14+
B(const this_type& b): A(20) {g++;}
1515
};
1616

1717
class C: B
1818
{
19-
typedef B base_type;
20-
typedef C this_type;
21-
public:
22-
C(): base_type(){}
23-
C(const base_type& b): base_type(b){g++;}
19+
typedef B base_type;
20+
typedef C this_type;
21+
public:
22+
C(): base_type() {}
23+
C(const base_type& b): base_type(b){g++;}
2424
};
2525

2626

2727
C c;
2828

2929
int main()
3030
{
31-
assert(g==10);
32-
B b;
33-
C c2 = b;
34-
assert(g==22);
31+
assert(g==10);
32+
B b;
33+
C c2 = b;
34+
assert(g==22);
3535
}

regression/cpp-from-CVS/Constructor14/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
struct A
22
{
3-
A(int i):i(i){}
3+
A(int i):i(i) {}
44
int i;
55
};
66

regression/cpp-from-CVS/Constructor16/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ class B: public A
1515

1616
int main()
1717
{
18-
B b1,b2;
18+
B b1, b2;
1919
b1 = b2; // not ok
2020
}

regression/cpp-from-CVS/Constructor17/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class C
22
{
33
public:
4-
C(int& v):v(v){};
4+
C(int& v):v(v) {}
55
int v;
66
};
77

0 commit comments

Comments
 (0)