mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-05 17:30:59 +02:00
doc: Fixup ToIntegral docs
This commit is contained in:
parent
927586990e
commit
fad55e79ca
@ -72,7 +72,7 @@ void SplitHostPort(std::string in, uint16_t& portOut, std::string& hostOut);
|
|||||||
|
|
||||||
// LocaleIndependentAtoi is provided for backwards compatibility reasons.
|
// LocaleIndependentAtoi is provided for backwards compatibility reasons.
|
||||||
//
|
//
|
||||||
// New code should use the ParseInt64/ParseUInt64/ParseInt32/ParseUInt32 functions
|
// New code should use ToIntegral or the ParseInt* functions
|
||||||
// which provide parse error feedback.
|
// which provide parse error feedback.
|
||||||
//
|
//
|
||||||
// The goal of LocaleIndependentAtoi is to replicate the exact defined behaviour
|
// The goal of LocaleIndependentAtoi is to replicate the exact defined behaviour
|
||||||
@ -125,7 +125,7 @@ constexpr inline bool IsSpace(char c) noexcept {
|
|||||||
/**
|
/**
|
||||||
* Convert string to integral type T. Leading whitespace, a leading +, or any
|
* Convert string to integral type T. Leading whitespace, a leading +, or any
|
||||||
* trailing character fail the parsing. The required format expressed as regex
|
* trailing character fail the parsing. The required format expressed as regex
|
||||||
* is `-?[0-9]+`.
|
* is `-?[0-9]+`. The minus sign is only permitted for signed integer types.
|
||||||
*
|
*
|
||||||
* @returns std::nullopt if the entire string could not be parsed, or if the
|
* @returns std::nullopt if the entire string could not be parsed, or if the
|
||||||
* parsed value is not in the range representable by the type T.
|
* parsed value is not in the range representable by the type T.
|
||||||
|
@ -38,7 +38,7 @@ export LC_ALL=C
|
|||||||
# https://stackoverflow.com/a/34878283 for more details.
|
# https://stackoverflow.com/a/34878283 for more details.
|
||||||
|
|
||||||
# TODO: Reduce KNOWN_VIOLATIONS by replacing uses of locale dependent stoul/strtol with locale
|
# TODO: Reduce KNOWN_VIOLATIONS by replacing uses of locale dependent stoul/strtol with locale
|
||||||
# independent ToIntegral<T>(...).
|
# independent ToIntegral<T>(...) or the ParseInt*() functions.
|
||||||
# TODO: Reduce KNOWN_VIOLATIONS by replacing uses of locale dependent snprintf with strprintf.
|
# TODO: Reduce KNOWN_VIOLATIONS by replacing uses of locale dependent snprintf with strprintf.
|
||||||
KNOWN_VIOLATIONS=(
|
KNOWN_VIOLATIONS=(
|
||||||
"src/bitcoin-tx.cpp.*stoul"
|
"src/bitcoin-tx.cpp.*stoul"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user