File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,13 @@ String::String(const String &value)
38
38
*this = value;
39
39
}
40
40
41
+ String::String (const __FlashStringHelper *str)
42
+ {
43
+ init ();
44
+ const char *cstr = reinterpret_cast <const char *>(str);
45
+ if (cstr) copy (cstr, strlen (cstr));
46
+ }
47
+
41
48
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
42
49
String::String (String &&rval)
43
50
{
Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ class String
80
80
// marked as invalid ("if (s)" will be false).
81
81
String & operator = (const String &rhs);
82
82
String & operator = (const char *cstr);
83
- String & operator = (const __FlashStringHelper *str);
83
+ String & operator = (const __FlashStringHelper *str) {
84
+ return operator =(reinterpret_cast <const char *>(str));
85
+ }
84
86
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
85
87
String & operator = (String &&rval);
86
88
String & operator = (StringSumHelper &&rval);
You can’t perform that action at this time.
0 commit comments