mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
implement !=
This commit is contained in:
parent
d7b412c1eb
commit
486661d6c6
|
@ -2,7 +2,7 @@
|
||||||
#define TAG_H__
|
#define TAG_H__
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2016, The PurpleI2P Project
|
* Copyright (c) 2013-2017, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
|
@ -28,6 +28,7 @@ public:
|
||||||
Tag (const uint8_t * buf) { memcpy (m_Buf, buf, sz); }
|
Tag (const uint8_t * buf) { memcpy (m_Buf, buf, sz); }
|
||||||
|
|
||||||
bool operator== (const Tag& other) const { return !memcmp (m_Buf, other.m_Buf, sz); }
|
bool operator== (const Tag& other) const { return !memcmp (m_Buf, other.m_Buf, sz); }
|
||||||
|
bool operator!= (const Tag& other) const { return !(*this == other); }
|
||||||
bool operator< (const Tag& other) const { return memcmp (m_Buf, other.m_Buf, sz) < 0; }
|
bool operator< (const Tag& other) const { return memcmp (m_Buf, other.m_Buf, sz) < 0; }
|
||||||
|
|
||||||
uint8_t * operator()() { return m_Buf; }
|
uint8_t * operator()() { return m_Buf; }
|
||||||
|
|
Loading…
Reference in a new issue