Some cleanups.

This commit is contained in:
JoelKatz
2013-03-08 10:23:11 -08:00
parent 7621feda7b
commit 9d990b82fa

View File

@@ -37,6 +37,9 @@ private:
void setHash() const; void setHash() const;
protected:
SHAMapNode(int depth, const uint256& id, bool) : mNodeID(id), mDepth(depth), mHash(0) { ; }
public: public:
static const int rootDepth = 0; static const int rootDepth = 0;
@@ -63,13 +66,14 @@ public:
bool operator<(const SHAMapNode&) const; bool operator<(const SHAMapNode&) const;
bool operator>(const SHAMapNode&) const; bool operator>(const SHAMapNode&) const;
bool operator==(const SHAMapNode&) const;
bool operator==(const uint256&) const;
bool operator!=(const SHAMapNode&) const;
bool operator!=(const uint256&) const;
bool operator<=(const SHAMapNode&) const; bool operator<=(const SHAMapNode&) const;
bool operator>=(const SHAMapNode&) const; bool operator>=(const SHAMapNode&) const;
bool operator==(const SHAMapNode& n) const { return (mDepth == n.mDepth) && (mNodeID == n.mNodeID); }
bool operator==(const uint256& n) const { return n == mNodeID; }
bool operator!=(const SHAMapNode& n) const { return (mDepth != n.mDepth) || (mNodeID != n.mNodeID); }
bool operator!=(const uint256& n) const { return n != mNodeID; }
virtual std::string getString() const; virtual std::string getString() const;
void dump() const; void dump() const;