Commit 024e089
committed
[Wire] simplified coding unnecessarily complex (hfvogt)
In the wire library there are several functions where
an unnecessarily complex coding has been used:
- endTransmission: the availability of data is already
checked in while(...), therefore need not be checked
again in the loop.
- requestFrom: the for-loop has a predefined and fixed
number of loops. Therefore a check whether the last
element has been reached is unnecessary and does not
add any benefit.
Fixes #201 parent 6e7409f commit 024e089
1 file changed
+8
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
71 | 70 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
84 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
| |||
132 | 125 | | |
133 | 126 | | |
134 | 127 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 128 | | |
| 129 | + | |
141 | 130 | | |
142 | 131 | | |
143 | 132 | | |
| |||
0 commit comments