-
Notifications
You must be signed in to change notification settings - Fork 13.3k
WString: remove operator==(const __FlashStringHelper*) #8569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
e15fc91
a5cc344
e4b47bc
a02c21c
bc52bd6
b912a70
65ad698
fb666ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,10 +211,9 @@ class String { | |
| return *this; | ||
| } | ||
|
|
||
| // checks whether the internal buffer pointer is set. | ||
| // (should not be the case for us, since we always reset the pointer to the SSO buffer instead of setting it to nullptr) | ||
| // checks whether the String is empty | ||
| explicit operator bool() const { | ||
| return buffer() != nullptr; | ||
| return length() != 0; | ||
| } | ||
|
|
||
| int compareTo(const String &s) const; | ||
|
|
@@ -230,6 +229,13 @@ class String { | |
| bool operator ==(const __FlashStringHelper *rhs) const { | ||
| return equals(rhs); | ||
| } | ||
| bool operator ==(std::nullptr_t) const { | ||
| return length() == 0; | ||
| } | ||
d-a-v marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| [[deprecated("use nullptr instead of NULL")]] | ||
| bool operator ==(decltype(NULL)) const { | ||
|
||
| return length() == 0; | ||
| } | ||
| bool operator !=(const String &rhs) const { | ||
| return !equals(rhs); | ||
| } | ||
|
|
@@ -239,6 +245,13 @@ class String { | |
| bool operator !=(const __FlashStringHelper *rhs) const { | ||
| return !equals(rhs); | ||
| } | ||
| bool operator !=(std::nullptr_t) const { | ||
| return length() != 0; | ||
| } | ||
| [[deprecated("use nullptr instead of NULL")]] | ||
| bool operator !=(decltype(NULL)) const { | ||
| return length() != 0; | ||
| } | ||
| bool operator <(const String &rhs) const; | ||
| bool operator >(const String &rhs) const; | ||
| bool operator <=(const String &rhs) const; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.