mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
273270916e
This commit reflects changes to clang-format rules. Unfortunately, these rule changes create a massive change to the codebase, which causes an apparent rewrite of git history. Git blame's --ignore-rev flag can be used to ignore this commit when attempting to `git blame` some code.
19 lines
343 B
C++
19 lines
343 B
C++
#include <util/encode.hpp>
|
|
|
|
#include <stdexcept>
|
|
|
|
namespace llarp
|
|
{
|
|
int
|
|
char2int(char input)
|
|
{
|
|
if (input >= '0' && input <= '9')
|
|
return input - '0';
|
|
if (input >= 'A' && input <= 'F')
|
|
return input - 'A' + 10;
|
|
if (input >= 'a' && input <= 'f')
|
|
return input - 'a' + 10;
|
|
return 0;
|
|
}
|
|
} // namespace llarp
|