check for zero ident

This commit is contained in:
orignal 2015-04-12 16:59:59 -04:00
parent 562de3514a
commit ce99357ebe
2 changed files with 31 additions and 10 deletions

View file

@ -41,6 +41,13 @@ namespace data
bool operator== (const Tag<sz>& other) const { return !memcmp (m_Buf, other.m_Buf, sz); };
bool operator< (const Tag<sz>& other) const { return memcmp (m_Buf, other.m_Buf, sz) < 0; };
bool IsZero () const
{
for (int i = 0; i < sz/8; i++)
if (ll[i]) return false;
return true;
}
std::string ToBase64 () const
{
char str[sz*2];