mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
Replace LocaleIndependentAtoi with ToIntegral
No need for saturating behavior when the int is composed of 3 digits.
This commit is contained in:
parent
faab76c1c0
commit
fa32af22b3
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ void TorControlConnection::readcb(struct bufferevent *bev, void *ctx)
|
|||
if (s.size() < 4) // Short line
|
||||
continue;
|
||||
// <status>(-|+| )<data><CRLF>
|
||||
self->message.code = LocaleIndependentAtoi<int>(s.substr(0,3));
|
||||
self->message.code = ToIntegral<int>(s.substr(0, 3)).value_or(0);
|
||||
self->message.lines.push_back(s.substr(4));
|
||||
char ch = s[3]; // '-','+' or ' '
|
||||
if (ch == ' ') {
|
||||
|
|
Loading…
Reference in a new issue