Move operator== into namespace

Argument-dependent lookup will find these if in the same namespace as
Proof itself.
This commit is contained in:
Jason Rhinelander 2021-09-03 02:17:07 -03:00
parent e3999ccb26
commit 03add6ebe3
2 changed files with 6 additions and 6 deletions

View file

@ -139,9 +139,7 @@ cryptonote::NOTIFY_BTENCODED_UPTIME_PROOF::request Proof::generate_request() con
return request;
}
}
bool operator==(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs)
bool operator==(const Proof& lhs, const Proof& rhs)
{
bool result = true;
@ -162,8 +160,9 @@ bool operator==(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs)
return result;
}
bool operator!=(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs)
bool operator!=(const Proof& lhs, const Proof& rhs)
{
return !(lhs == rhs);
}
}

View file

@ -41,6 +41,7 @@ public:
cryptonote::NOTIFY_BTENCODED_UPTIME_PROOF::request generate_request() const;
};
bool operator==(const Proof& lhs, const Proof& rhs);
bool operator!=(const Proof& lhs, const Proof& rhs);
}
bool operator==(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs);
bool operator!=(const uptime_proof::Proof& lhs, const uptime_proof::Proof& rhs);