|
1 | 1 | // SPDX-License-Identifier: MIT |
2 | | -pragma solidity 0.8.32; |
| 2 | +pragma solidity 0.8.33; |
3 | 3 |
|
4 | 4 | contract AddNoParentheses { |
5 | | - function addAdd(uint256 a, uint256 b, uint256 c) |
6 | | - public |
7 | | - pure |
8 | | - returns (uint256) |
9 | | - { |
| 5 | + function addAdd( |
| 6 | + uint256 a, |
| 7 | + uint256 b, |
| 8 | + uint256 c |
| 9 | + ) public pure returns (uint256) { |
10 | 10 | return a + b + c; |
11 | 11 | } |
12 | 12 |
|
13 | | - function addSub(uint256 a, uint256 b, uint256 c) |
14 | | - public |
15 | | - pure |
16 | | - returns (uint256) |
17 | | - { |
| 13 | + function addSub( |
| 14 | + uint256 a, |
| 15 | + uint256 b, |
| 16 | + uint256 c |
| 17 | + ) public pure returns (uint256) { |
18 | 18 | return a + b - c; |
19 | 19 | } |
20 | 20 |
|
21 | | - function addMul(uint256 a, uint256 b, uint256 c) |
22 | | - public |
23 | | - pure |
24 | | - returns (uint256) |
25 | | - { |
| 21 | + function addMul( |
| 22 | + uint256 a, |
| 23 | + uint256 b, |
| 24 | + uint256 c |
| 25 | + ) public pure returns (uint256) { |
26 | 26 | return a + b * c; |
27 | 27 | } |
28 | 28 |
|
29 | | - function addDiv(uint256 a, uint256 b, uint256 c) |
30 | | - public |
31 | | - pure |
32 | | - returns (uint256) |
33 | | - { |
| 29 | + function addDiv( |
| 30 | + uint256 a, |
| 31 | + uint256 b, |
| 32 | + uint256 c |
| 33 | + ) public pure returns (uint256) { |
34 | 34 | return a + b / c; |
35 | 35 | } |
36 | 36 |
|
37 | | - function addMod(uint256 a, uint256 b, uint256 c) |
38 | | - public |
39 | | - pure |
40 | | - returns (uint256) |
41 | | - { |
42 | | - return a + b % c; |
| 37 | + function addMod( |
| 38 | + uint256 a, |
| 39 | + uint256 b, |
| 40 | + uint256 c |
| 41 | + ) public pure returns (uint256) { |
| 42 | + return a + (b % c); |
43 | 43 | } |
44 | 44 |
|
45 | | - function addExp(uint256 a, uint256 b, uint256 c) |
46 | | - public |
47 | | - pure |
48 | | - returns (uint256) |
49 | | - { |
| 45 | + function addExp( |
| 46 | + uint256 a, |
| 47 | + uint256 b, |
| 48 | + uint256 c |
| 49 | + ) public pure returns (uint256) { |
50 | 50 | return a + b ** c; |
51 | 51 | } |
52 | 52 |
|
53 | | - function addShiftL(uint256 a, uint256 b, uint256 c) |
54 | | - public |
55 | | - pure |
56 | | - returns (uint256) |
57 | | - { |
58 | | - return a + b << c; |
| 53 | + function addShiftL( |
| 54 | + uint256 a, |
| 55 | + uint256 b, |
| 56 | + uint256 c |
| 57 | + ) public pure returns (uint256) { |
| 58 | + return (a + b) << c; |
59 | 59 | } |
60 | 60 |
|
61 | | - function addShiftR(uint256 a, uint256 b, uint256 c) |
62 | | - public |
63 | | - pure |
64 | | - returns (uint256) |
65 | | - { |
66 | | - return a + b >> c; |
| 61 | + function addShiftR( |
| 62 | + uint256 a, |
| 63 | + uint256 b, |
| 64 | + uint256 c |
| 65 | + ) public pure returns (uint256) { |
| 66 | + return (a + b) >> c; |
67 | 67 | } |
68 | 68 |
|
69 | | - function addBitAnd(uint256 a, uint256 b, uint256 c) |
70 | | - public |
71 | | - pure |
72 | | - returns (uint256) |
73 | | - { |
74 | | - return a + b & c; |
| 69 | + function addBitAnd( |
| 70 | + uint256 a, |
| 71 | + uint256 b, |
| 72 | + uint256 c |
| 73 | + ) public pure returns (uint256) { |
| 74 | + return (a + b) & c; |
75 | 75 | } |
76 | 76 |
|
77 | | - function addBitOr(uint256 a, uint256 b, uint256 c) |
78 | | - public |
79 | | - pure |
80 | | - returns (uint256) |
81 | | - { |
82 | | - return a + b | c; |
| 77 | + function addBitOr( |
| 78 | + uint256 a, |
| 79 | + uint256 b, |
| 80 | + uint256 c |
| 81 | + ) public pure returns (uint256) { |
| 82 | + return (a + b) | c; |
83 | 83 | } |
84 | 84 |
|
85 | | - function addBitXor(uint256 a, uint256 b, uint256 c) |
86 | | - public |
87 | | - pure |
88 | | - returns (uint256) |
89 | | - { |
90 | | - return a + b ^ c; |
| 85 | + function addBitXor( |
| 86 | + uint256 a, |
| 87 | + uint256 b, |
| 88 | + uint256 c |
| 89 | + ) public pure returns (uint256) { |
| 90 | + return (a + b) ^ c; |
91 | 91 | } |
92 | 92 | } |
0 commit comments