Browse Source

dead code removal

Adam Ierymenko 5 years ago
parent
commit
77e59818a3
2 changed files with 1 additions and 15 deletions
  1. 0 7
      node/Buf.hpp
  2. 1 8
      node/Fingerprint.hpp

+ 0 - 7
node/Buf.hpp

@@ -706,13 +706,6 @@ public:
 	template<typename T>
 	ZT_ALWAYS_INLINE const T &as(const unsigned int i = 0) const noexcept { return *reinterpret_cast<const T *>(unsafeData + i); }
 
-	ZT_ALWAYS_INLINE bool operator==(const Buf &b2) const noexcept { return (memcmp(unsafeData,b2.unsafeData,ZT_BUF_MEM_SIZE) == 0); }
-	ZT_ALWAYS_INLINE bool operator!=(const Buf &b2) const noexcept { return (memcmp(unsafeData,b2.unsafeData,ZT_BUF_MEM_SIZE) != 0); }
-	ZT_ALWAYS_INLINE bool operator<(const Buf &b2) const noexcept { return (memcmp(unsafeData,b2.unsafeData,ZT_BUF_MEM_SIZE) < 0); }
-	ZT_ALWAYS_INLINE bool operator<=(const Buf &b2) const noexcept { return (memcmp(unsafeData,b2.unsafeData,ZT_BUF_MEM_SIZE) <= 0); }
-	ZT_ALWAYS_INLINE bool operator>(const Buf &b2) const noexcept { return (memcmp(unsafeData,b2.unsafeData,ZT_BUF_MEM_SIZE) > 0); }
-	ZT_ALWAYS_INLINE bool operator>=(const Buf &b2) const noexcept { return (memcmp(unsafeData,b2.unsafeData,ZT_BUF_MEM_SIZE) >= 0); }
-
 	/**
 	 * Raw data held in buffer
 	 *

+ 1 - 8
node/Fingerprint.hpp

@@ -35,15 +35,8 @@ class Fingerprint : public TriviallyCopyable
 {
 public:
 	ZT_ALWAYS_INLINE Fingerprint() noexcept {}
-	explicit ZT_ALWAYS_INLINE Fingerprint(const void *h384) noexcept { memcpy(_h,h384,48); }
 
-	ZT_ALWAYS_INLINE void set(const void *h384) noexcept { memcpy(_h,h384,48); }
-
-	ZT_ALWAYS_INLINE void zero() noexcept
-	{
-		for(unsigned int i=0;i<(384 / (sizeof(unsigned long) * 8));++i)
-			_h[i] = 0;
-	}
+	ZT_ALWAYS_INLINE void zero() noexcept { memoryZero(this); }
 
 	ZT_ALWAYS_INLINE uint8_t *data() noexcept { return reinterpret_cast<uint8_t *>(_h); }
 	ZT_ALWAYS_INLINE const uint8_t *data() const noexcept { return reinterpret_cast<const uint8_t *>(_h); }