for completeness' sake

This commit is contained in:
DarthArgus
2016-12-13 06:51:26 +00:00
parent 3c0115921e
commit d3ed5359ca
2 changed files with 17 additions and 0 deletions
@@ -47,6 +47,7 @@ public:
NetworkId& operator= (const NetworkId&);
bool operator< (const NetworkId& rhs) const;
bool operator> (const NetworkId& rhs) const;
bool operator== (const NetworkId& rhs) const;
bool operator!= (const NetworkId& rhs) const;
size_t getHashValue() const;
@@ -94,6 +95,11 @@ inline bool NetworkId::operator< (const NetworkId& rhs) const
return m_value < rhs.m_value;
}
inline bool NetworkId::operator> (const NetworkId& rhs) const
{
return m_value > rhs.m_value;
}
// -----------------------------------------------------------------------
inline bool NetworkId::operator== (const NetworkId& rhs) const
@@ -63,6 +63,7 @@ public:
IndexKey(const NetworkId &objectId, int nameId);
bool operator==(const IndexKey &rhs) const;
bool operator<(const IndexKey &rhs) const;
bool operator>(const IndexKey &rhs) const;
};
struct ObjvarValue
@@ -115,6 +116,16 @@ inline bool ObjvarBuffer::IndexKey::operator<(const IndexKey &rhs) const
return false;
}
inline bool ObjvarBuffer::IndexKey::operator>(const IndexKey &rhs) const
{
if (m_objectId > rhs.m_objectId)
return true;
else if (m_objectId == rhs.m_objectId)
return (m_nameId > rhs.m_nameId);
else
return false;
}
// ======================================================================
#endif