diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-09-09 14:52:07 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-09-10 04:24:57 +0200 |
commit | ac4e7f6269429b27f32d290df7e0572814e60068 (patch) | |
tree | 0ca4752c88b1f74ac4c1a9f3f65d4dae41600a6a /src/uint256.h | |
parent | 963af6449f3fbbb3f9fd79547a33e4f3d5e3f0d0 (diff) |
HexStr: don't build a vector<char> first
Also const correctness for lookup tables in hex functions throughout the code.
Diffstat (limited to 'src/uint256.h')
-rw-r--r-- | src/uint256.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uint256.h b/src/uint256.h index fc5ed26592..abd0b71e6f 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -306,7 +306,7 @@ public: psz += 2; // hex string to uint - static unsigned char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 }; + static const unsigned char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 }; const char* pbegin = psz; while (phexdigit[(unsigned char)*psz] || *psz == '0') psz++; |