X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fuint256.h;h=fc5ed26592070d18064e01d36a6ae7f67a818273;hp=3524580532d6bc8ed270ad3b7b3e1673aa64fb31;hb=e10622d1297e638109bbf58c35ad008f7acbae7c;hpb=ccd65d426156c3d5b7a8f1123210decd1f06fe42 diff --git a/src/uint256.h b/src/uint256.h index 3524580..fc5ed26 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -1,17 +1,16 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_UINT256_H #define BITCOIN_UINT256_H #include +#include #include #include #include -#include "version.h" - typedef long long int64; typedef unsigned long long uint64; @@ -307,7 +306,7 @@ public: psz += 2; // hex string to uint - static 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 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++; @@ -355,19 +354,22 @@ public: return pn[2*n] | (uint64)pn[2*n+1] << 32; } - unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const +// unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const + unsigned int GetSerializeSize(int nType, int nVersion) const { return sizeof(pn); } template - void Serialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) const +// void Serialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) const + void Serialize(Stream& s, int nType, int nVersion) const { s.write((char*)pn, sizeof(pn)); } template - void Unserialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) +// void Unserialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) + void Unserialize(Stream& s, int nType, int nVersion) { s.read((char*)pn, sizeof(pn)); }