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

Remove deprecation diagnostic supppression for dtostrf#212

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

Open
jboynes wants to merge1 commit intoarduino:master
base:master
Choose a base branch
Loading
fromjboynes:undeprecate_dtostrf

Conversation

jboynes
Copy link
Contributor

Have the tests use an implementation ofdtostrf which checks for the largest buffer needed by the String class.
Document the risks of that implementaton and add a TODO not to rely on this function in the production code.

As this no longer uses the deprecated sample implementation, the warning suppression can be removed as it is not compiled.

@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change:-0.03%⚠️

Comparison is base(66aa7db) 95.52% compared to head(fdda28c) 95.50%.

Additional details and impacted files
@@            Coverage Diff             @@##           master     #212      +/-   ##==========================================- Coverage   95.52%   95.50%   -0.03%==========================================  Files          16       15       -1       Lines        1072     1067       -5     ==========================================- Hits         1024     1019       -5  Misses         48       48

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

@robertlipe
Copy link

I'm not a maintainer. This is just a fly-by comment.

Isn't thishttps://en.cppreference.com/w/cpp/string/basic_string/to_string.html
for the common case and
https://en.cppreference.com/w/cpp/utility/to_chars.html for the rest?

Adding new names for things that have been in the standard library for years just splits developer mindshare and increases maintenance burden. to_chars, unlike the warning in the code here, doesn't have the risk of buffer overruns.

@matthijskooijman
Copy link
Collaborator

Isn't thishttps://en.cppreference.com/w/cpp/string/basic_string/to_string.html
for the common case and

Nope, that usesstd::string, while Arduino has its own String type (partly for simpler API, partly because I thinkstd::string (and most of libstdc++) is not enabled/available on AVR).

@robertlipe
Copy link

Well, if the project is going to keep independently implementing standard c++, please at least consider using the same name and APIs and just use a wrapper for the funky return type so as to not further wall off compatibility between code written for Arduino, which is not always running on ancient processors. More importantly, skill sets of people that "program for Arduino" and people that develop in ISO C++ will be helped by not having to unlearn that normal coding doesn't apply and standard things have special names.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@jboynes@codecov-commenter@robertlipe@matthijskooijman@per1234

[8]ページ先頭

©2009-2025 Movatter.jp