From 4843b55fd167c54d86eb9e1f19525ed363cfe72d Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Sun, 13 May 2012 21:31:59 +0200 Subject: Make CNetAddr::GetHash() return an unsigned val. This prevents an undefined operation in main.cpp, when shifting the hash value left by 32 bits. Shifting a signed int left into the sign bit is undefined in C++11. --- src/netbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/netbase.h') diff --git a/src/netbase.h b/src/netbase.h index 514a1ae950..544a666866 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -66,7 +66,7 @@ class CNetAddr std::string ToString() const; std::string ToStringIP() const; int GetByte(int n) const; - int64 GetHash() const; + uint64 GetHash() const; bool GetInAddr(struct in_addr* pipv4Addr) const; std::vector GetGroup() const; int GetReachabilityFrom(const CNetAddr *paddrPartner = NULL) const; -- cgit v1.2.3