|
27 | 27 | /* Constructors */
|
28 | 28 | /*********************************************/
|
29 | 29 |
|
| 30 | +using namespace arduino; |
| 31 | + |
30 | 32 | String::String(const char *cstr)
|
31 | 33 | {
|
32 | 34 | init();
|
@@ -352,77 +354,77 @@ unsigned char String::concat(const __FlashStringHelper * str)
|
352 | 354 | /* Concatenate */
|
353 | 355 | /*********************************************/
|
354 | 356 |
|
355 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs) |
| 357 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, const String &rhs) |
356 | 358 | {
|
357 | 359 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
358 | 360 | if (!a.concat(rhs.buffer, rhs.len)) a.invalidate();
|
359 | 361 | return a;
|
360 | 362 | }
|
361 | 363 |
|
362 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr) |
| 364 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, const char *cstr) |
363 | 365 | {
|
364 | 366 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
365 | 367 | if (!cstr || !a.concat(cstr, strlen(cstr))) a.invalidate();
|
366 | 368 | return a;
|
367 | 369 | }
|
368 | 370 |
|
369 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, char c) |
| 371 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, char c) |
370 | 372 | {
|
371 | 373 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
372 | 374 | if (!a.concat(c)) a.invalidate();
|
373 | 375 | return a;
|
374 | 376 | }
|
375 | 377 |
|
376 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, unsigned char num) |
| 378 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, unsigned char num) |
377 | 379 | {
|
378 | 380 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
379 | 381 | if (!a.concat(num)) a.invalidate();
|
380 | 382 | return a;
|
381 | 383 | }
|
382 | 384 |
|
383 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, int num) |
| 385 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, int num) |
384 | 386 | {
|
385 | 387 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
386 | 388 | if (!a.concat(num)) a.invalidate();
|
387 | 389 | return a;
|
388 | 390 | }
|
389 | 391 |
|
390 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num) |
| 392 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, unsigned int num) |
391 | 393 | {
|
392 | 394 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
393 | 395 | if (!a.concat(num)) a.invalidate();
|
394 | 396 | return a;
|
395 | 397 | }
|
396 | 398 |
|
397 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, long num) |
| 399 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, long num) |
398 | 400 | {
|
399 | 401 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
400 | 402 | if (!a.concat(num)) a.invalidate();
|
401 | 403 | return a;
|
402 | 404 | }
|
403 | 405 |
|
404 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num) |
| 406 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, unsigned long num) |
405 | 407 | {
|
406 | 408 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
407 | 409 | if (!a.concat(num)) a.invalidate();
|
408 | 410 | return a;
|
409 | 411 | }
|
410 | 412 |
|
411 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, float num) |
| 413 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, float num) |
412 | 414 | {
|
413 | 415 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
414 | 416 | if (!a.concat(num)) a.invalidate();
|
415 | 417 | return a;
|
416 | 418 | }
|
417 | 419 |
|
418 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, double num) |
| 420 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, double num) |
419 | 421 | {
|
420 | 422 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
421 | 423 | if (!a.concat(num)) a.invalidate();
|
422 | 424 | return a;
|
423 | 425 | }
|
424 | 426 |
|
425 |
| -StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs) |
| 427 | +StringSumHelper & arduino::operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs) |
426 | 428 | {
|
427 | 429 | StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
|
428 | 430 | if (!a.concat(rhs)) a.invalidate();
|
|
0 commit comments