Commit 0894b51
authored
WString: direct operator overloads instead of StringSumHelper (#7781)
* wip
* huh, turns out String = 'c' did some weird stuff
* style
* allow "blah" + String, 'c' + String and F("...") + String
also, simplify const char* vs. __FlashStringHelper, and just always use _P functions
* shuffle things into .cpp
* trying to fix arduinojson
based on the implementation, we only need to specify that this symbol is a class
* fix accidental realloc, add test for operator+
basic chaining should work just like with master
comparing std::move() buffers won't work though, because we never allow
anything but `const StringSumHelper&` references
* fixup! fix accidental realloc, add test for operator+
* don't need another branch
* template +=(String / char* / numbers) and +(String, numbers / char*)
* nul after moving (isnt mem always zeroed tho?)
* check if lhs cant keep before switching to rhs
* fix String used to store struct data
`cannot bind bit-field '...' to 'signed char&'
`cannot bind bit-field '...' to 'unssigned char&'
noticed in both tasmota and espeasy, where this generates a webpage
content from some status struct containing bitfields
* style once more
* typo
* recover 44400211 parent 1b922ed commit 0894b51
File tree
4 files changed
+199
-199
lines changed- cores/esp8266
- tests/host/core
4 files changed
+199
-199
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
| |||
281 | 280 | | |
282 | 281 | | |
283 | 282 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 283 | | |
292 | 284 | | |
293 | 285 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
| |||
390 | 385 | | |
391 | 386 | | |
392 | 387 | | |
393 | | - | |
| 388 | + | |
394 | 389 | | |
395 | 390 | | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
402 | 394 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
409 | 399 | | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
| 400 | + | |
| 401 | + | |
416 | 402 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
423 | 407 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 408 | + | |
429 | 409 | | |
430 | 410 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
436 | 414 | | |
437 | 415 | | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
443 | 419 | | |
444 | 420 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
| 421 | + | |
| 422 | + | |
450 | 423 | | |
451 | 424 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 425 | + | |
| 426 | + | |
457 | 427 | | |
458 | 428 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
464 | 443 | | |
465 | 444 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
471 | 458 | | |
472 | 459 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
478 | 466 | | |
479 | 467 | | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
485 | 474 | | |
486 | 475 | | |
487 | 476 | | |
| |||
0 commit comments