Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2136fda

Browse files
cmagliefacchinm
authored andcommitted
Fixed warning about namespace
1 parent30e4397 commit2136fda

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

‎api/String.cpp‎

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/* Constructors*/
2828
/*********************************************/
2929

30-
usingnamespacearduino;
30+
namespacearduino {
3131

3232
String::String(constchar *cstr)
3333
{
@@ -354,77 +354,77 @@ unsigned char String::concat(const __FlashStringHelper * str)
354354
/* Concatenate*/
355355
/*********************************************/
356356

357-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,const String &rhs)
357+
StringSumHelper &operator + (const StringSumHelper &lhs,const String &rhs)
358358
{
359359
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
360360
if (!a.concat(rhs.buffer, rhs.len)) a.invalidate();
361361
return a;
362362
}
363363

364-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,constchar *cstr)
364+
StringSumHelper &operator + (const StringSumHelper &lhs,constchar *cstr)
365365
{
366366
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
367367
if (!cstr || !a.concat(cstr,strlen(cstr))) a.invalidate();
368368
return a;
369369
}
370370

371-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,char c)
371+
StringSumHelper &operator + (const StringSumHelper &lhs,char c)
372372
{
373373
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
374374
if (!a.concat(c)) a.invalidate();
375375
return a;
376376
}
377377

378-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,unsignedchar num)
378+
StringSumHelper &operator + (const StringSumHelper &lhs,unsignedchar num)
379379
{
380380
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
381381
if (!a.concat(num)) a.invalidate();
382382
return a;
383383
}
384384

385-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,int num)
385+
StringSumHelper &operator + (const StringSumHelper &lhs,int num)
386386
{
387387
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
388388
if (!a.concat(num)) a.invalidate();
389389
return a;
390390
}
391391

392-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,unsignedint num)
392+
StringSumHelper &operator + (const StringSumHelper &lhs,unsignedint num)
393393
{
394394
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
395395
if (!a.concat(num)) a.invalidate();
396396
return a;
397397
}
398398

399-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,long num)
399+
StringSumHelper &operator + (const StringSumHelper &lhs,long num)
400400
{
401401
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
402402
if (!a.concat(num)) a.invalidate();
403403
return a;
404404
}
405405

406-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,unsignedlong num)
406+
StringSumHelper &operator + (const StringSumHelper &lhs,unsignedlong num)
407407
{
408408
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
409409
if (!a.concat(num)) a.invalidate();
410410
return a;
411411
}
412412

413-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,float num)
413+
StringSumHelper &operator + (const StringSumHelper &lhs,float num)
414414
{
415415
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
416416
if (!a.concat(num)) a.invalidate();
417417
return a;
418418
}
419419

420-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,double num)
420+
StringSumHelper &operator + (const StringSumHelper &lhs,double num)
421421
{
422422
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
423423
if (!a.concat(num)) a.invalidate();
424424
return a;
425425
}
426426

427-
StringSumHelper &arduino::operator + (const StringSumHelper &lhs,const __FlashStringHelper *rhs)
427+
StringSumHelper &operator + (const StringSumHelper &lhs,const __FlashStringHelper *rhs)
428428
{
429429
StringSumHelper &a =const_cast<StringSumHelper&>(lhs);
430430
if (!a.concat(rhs))a.invalidate();
@@ -742,3 +742,5 @@ double String::toDouble(void) const
742742
if (buffer)returnatof(buffer);
743743
return0;
744744
}
745+
746+
}// namespace arduino

‎api/String.h‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#endif
3535

3636
namespacearduino {
37+
3738
// When compiling programs with this class, the following gcc parameters
3839
// dramatically increase performance and memory (RAM) efficiency, typically
3940
// with little or no increase in code size.
@@ -246,6 +247,7 @@ class StringSumHelper : public String
246247
StringSumHelper(double num) : String(num) {}
247248
};
248249

249-
}
250+
}// namespace arduino
251+
250252
#endif// __cplusplus
251253
#endif// __ARDUINO_STRINGS__

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp