-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit 5edf464
refactor(ble): Avoid unnecessary String copies
Pass String by const reference to many `setValue()` functions
to avoid copying it.
Even there are not so much data inside these strings, it just
looks too odd to copy them every time.
Also this change decreases binary size (~200 bytes in my case).1 parent 273eedf commit 5edf464
File tree
8 files changed
+12
-12
lines changed- libraries/BLE/src
8 files changed
+12
-12
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 | - | ||
50 | + | ||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 | - | ||
43 | + | ||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
371 | 371 |
| |
372 | 372 |
| |
373 | 373 |
| |
374 | - | ||
375 | - | ||
374 | + | ||
375 | + | ||
376 | 376 |
| |
377 | 377 |
| |
378 | 378 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
185 | 185 |
| |
186 | 186 |
| |
187 | 187 |
| |
188 | - | ||
188 | + | ||
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
203 | 203 |
| |
204 | 204 |
| |
205 | 205 |
| |
206 | - | ||
207 | - | ||
206 | + | ||
207 | + | ||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
98 | - | ||
98 | + | ||
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 | - | ||
40 | + | ||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 | - | ||
124 | + | ||
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 | - | ||
37 | + | ||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | - | ||
46 | + | ||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
|
0 commit comments