/////////////////////////////////////////////////////////////////////////// Converts '0' -> 0 '9' -> 9 'a'/'A' -> 10 'f'/'F' -> 15
| 242 | // 'a'/'A' -> 10 |
| 243 | // 'f'/'F' -> 15 |
| 244 | int Lexer::hexToInt(int c) { |
| 245 | if (c >= '0' && c <= '9') |
| 246 | return (c - '0'); |
| 247 | else if (c >= 'a' && c <= 'f') |
| 248 | return (c - 'a' + 10); |
| 249 | else |
| 250 | return (c - 'A' + 10); |
| 251 | } |
| 252 | |
| 253 | //////////////////////////////////////////////////////////////////////////////// |
| 254 | int Lexer::hexToInt(int c0, int c1) { return (hexToInt(c0) << 4) + hexToInt(c1); } |
nothing calls this directly
no outgoing calls
no test coverage detected