This patch replicates the refactoring proposed in D3732.
I think it's better to first remove ReadHex/ReadDecimal in favor of ParseHex/ParseDecimal in a small separate change, and then proceed with this change.
|38 ↗||(On Diff #11839)|
This is weird you don't have (c >= 'A' && c <= 'F'), although these values are handled in ParseHex().
|164 ↗||(On Diff #11839)|
I believe you can safely replace ReadHex with ParseHex here, and get rid of the former.
|169 ↗||(On Diff #11839)|
... And replace this with ParseDecimal() for consistency.
|90 ↗||(On Diff #11839)|
Fix comment near this #endif
LGTM modulo nits below.
|90 ↗||(On Diff #11877)|
This function is implemented only on FreeBSD and Linux, but not on Mac. Put it near the ProcSelfMapsBuff definition above.
|29 ↗||(On Diff #11877)|
please change it back to c - 'a' + 10
|31 ↗||(On Diff #11877)|
and c - 'A' + 10
|32 ↗||(On Diff #11877)|
remove the parens