HomePhabricator

[backport#15139] util: Make ToLower and ToUpper take a char

Description

[backport#15139] util: Make ToLower and ToUpper take a char

Summary:
Unfortunately, std::string elements are (bare) chars. As these
are the most likely type to be passed to these functions, make them use
char instead of unsigned char. This avoids some casts.

https://github.com/bitcoin/bitcoin/pull/15139/commits/332b3dd7c156daa08df347dc3359f0ee99ce4baa


Depends on D6294

Concludes backport of Core PR15139

Test Plan:

ninja check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D6295

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jan 10 2019, 00:46
majcostaCommitted on Jun 2 2020, 18:20
majcostaPushed on Jun 2 2020, 18:20
Reviewer
Restricted Project
Differential Revision
D6295: [backport#15139] util: Make ToLower and ToUpper take a char
Parents
rABC52379b02de1e: [backport#14599] Use functions guaranteed to be locale independent
Branches
Unknown
Tags
Unknown