diff --git a/src/cpp/ripple/SHAMap.h b/src/cpp/ripple/SHAMap.h index a03eb76bd..fb5fbc155 100644 --- a/src/cpp/ripple/SHAMap.h +++ b/src/cpp/ripple/SHAMap.h @@ -204,9 +204,9 @@ public: bool isAccountState() const { return mType == tnACCOUNT_STATE; } // inner node functions - bool isInnerNode() const { return !mItem; } + bool isInnerNode() const { return !mItem; } bool setChildHash(int m, const uint256& hash); - bool isEmptyBranch(int m) const { return !mHashes[m]; } + bool isEmptyBranch(int m) const { return mHashes[m].isZero(); } bool isEmpty() const; int getBranchCount() const; void makeInner(); diff --git a/src/cpp/ripple/uint256.h b/src/cpp/ripple/uint256.h index 2937be12a..872fce531 100644 --- a/src/cpp/ripple/uint256.h +++ b/src/cpp/ripple/uint256.h @@ -298,22 +298,22 @@ public: unsigned char* begin() { - return (unsigned char*) &pn[0]; + return reinterpret_cast(pn); } unsigned char* end() { - return (unsigned char*) &pn[WIDTH]; + return reinterpret_cast(pn + WIDTH); } const unsigned char* begin() const { - return (const unsigned char*) &pn[0]; + return reinterpret_cast(pn); } const unsigned char* end() const { - return (unsigned char*) &pn[WIDTH]; + return reinterpret_cast(pn + WIDTH); } unsigned int size() const