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

WString: return bool instead of unsigned char#7939

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
earlephilhower merged 2 commits intoesp8266:masterfrommcspr:string-bool-success
May 15, 2021

Conversation

mcspr
Copy link
Collaborator

@mcsprmcspr commentedMar 25, 2021
edited
Loading

Clean up the intent, resulting assembly stays the same as far as I could tell (objdump + vimdiff)
Follow-up#7781

if(s) helper is kind of redundant though, sincec_str()buffer() may never be nullptr and always points to something. Still needed to be compatible though, if something uses it

Clean up the intent, resulting assembly stays the same.
Copy link
Collaborator

@earlephilhowerearlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks, I really like the idea,@mcspr !

That said, I'm worried about changing the signature of something as basic asString. Even today, in the ArduinoAPI repoString.h usesunsigned char. So this change would move our interface away from that, and break anything inheriting from String.
https://github.com/earlephilhower/ArduinoCore-API/blob/9da53735171f7cccbe781c66d9ee1068d94d6ec8/api/String.h

So I'm honestly not sure which way to go here. Let's discuss and see if we can get anyone else's input.

@mcspr
Copy link
CollaboratorAuthor

I may be missing the actual issue, but since this is not virtual inheritance methods do not depend on the base signature:
https://godbolt.org/z/x9b5be8b4
Removing the implementation will use the BaseX method implicitly,but if method signature is actually different one needs to do ausing BaseX::method; to make it use the base method.

Also opened a PR to the ArduinoCore-API with a similar change

@earlephilhowerearlephilhower self-requested a reviewMay 15, 2021 21:41
Copy link
Collaborator

@earlephilhowerearlephilhower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Solid explanation. I'm happy to give this a shot and see if we uncover some weirdness in ancient libs, since it looks like the odds are very low.

@earlephilhowerearlephilhower merged commit0aaadd9 intoesp8266:masterMay 15, 2021
@mcsprmcspr deleted the string-bool-success branchMay 26, 2021 08:40
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@earlephilhowerearlephilhowerearlephilhower approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@mcspr@earlephilhower

[8]ページ先頭

©2009-2025 Movatter.jp