Skip to content

Commit faf55fc

Browse files
MarcoFalkefjahr
andcommitted
doc: Remove ParseInt mentions in documentation
In the dev notes, remove the whole section, because: * ParseDouble was removed in commit fa9d72a * The locale-dependent atoi is already checked by test/lint/lint-locale-dependence.py Co-authored-by: Fabian Jahr <fjahr@protonmail.com>
1 parent 3333282 commit faf55fc

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

doc/developer-notes.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,10 +1009,6 @@ Strings and formatting
10091009
buffer overflows, and surprises with `\0` characters. Also, some C string manipulations
10101010
tend to act differently depending on platform, or even the user locale.
10111011
1012-
- Use `ToIntegral` from [`strencodings.h`](/src/util/strencodings.h) for number parsing. In legacy code you might also find `ParseInt*` family of functions, `ParseDouble` or `LocaleIndependentAtoi`.
1013-
1014-
- *Rationale*: These functions do overflow checking and avoid pesky locale issues.
1015-
10161012
- For `strprintf`, `LogInfo`, `LogDebug`, etc formatting characters don't need size specifiers.
10171013
10181014
- *Rationale*: Bitcoin Core uses tinyformat, which is type safe. Leave them out to avoid confusion.

src/util/strencodings.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ bool SplitHostPort(std::string_view in, uint16_t& portOut, std::string& hostOut)
105105

106106
// LocaleIndependentAtoi is provided for backwards compatibility reasons.
107107
//
108-
// New code should use ToIntegral or the ParseInt* functions
109-
// which provide parse error feedback.
108+
// New code should use ToIntegral.
110109
//
111110
// The goal of LocaleIndependentAtoi is to replicate the defined behaviour of
112111
// std::atoi as it behaves under the "C" locale, and remove some undefined

0 commit comments

Comments
 (0)