Skip to content

[String] Use .equals for flash strings instead of == #4224

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

Merged
merged 4 commits into from
Aug 27, 2022

Conversation

TD-er
Copy link
Member

@TD-er TD-er commented Aug 26, 2022

Extending the operator == in esp8266/Arduino WString for flash strings does reduce bin size.
However this change was already removed before.
See: esp8266/Arduino#8663 (comment)

Therefore it is best to replace == F("...") with .equals(F("...")) in our code.

N.B. this may only reduce bin size on SDK 3.0.x builds as there was no .equals for flash strings in SDK 2.7.4

@TD-er TD-er merged commit 187961e into letscontrolit:mega Aug 27, 2022
@TD-er TD-er deleted the buildsize/esp8266_string_compare branch August 27, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant