aboutsummaryrefslogtreecommitdiff
path: root/src/uint256.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/uint256.h')
-rw-r--r--src/uint256.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/uint256.h b/src/uint256.h
index 0947816785..bf3c55bccb 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -5,9 +5,8 @@
#ifndef BITCOIN_UINT256_H
#define BITCOIN_UINT256_H
-#include "serialize.h"
-
#include <limits.h>
+#include <string.h>
#include <string>
#include <vector>
@@ -287,7 +286,7 @@ public:
std::string GetHex() const
{
char psz[sizeof(pn)*2 + 1];
- for (int i = 0; i < sizeof(pn); i++)
+ for (unsigned int i = 0; i < sizeof(pn); i++)
sprintf(psz + i*2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]);
return std::string(psz, psz + sizeof(pn)*2);
}
@@ -354,19 +353,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<typename Stream>
- 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<typename Stream>
- 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));
}