Skip to content
Snippets Groups Projects
Commit 5800dda9 authored by Steven Murray's avatar Steven Murray
Browse files

Added the SecurityIdentity::operator<() method

parent 00ca9a96
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,17 @@ bool SecurityIdentity::operator!=(const SecurityIdentity &rhs) const {
return !operator==(rhs);
}
//------------------------------------------------------------------------------
// operator<
//------------------------------------------------------------------------------
bool SecurityIdentity::operator<(const SecurityIdentity &rhs) const {
if(username == rhs.username) {
return host < rhs.host;
} else {
return username < rhs.username;
}
}
//------------------------------------------------------------------------------
// operator<<
//------------------------------------------------------------------------------
......
......@@ -41,6 +41,8 @@ struct SecurityIdentity {
bool operator!=(const SecurityIdentity &rhs) const;
bool operator<(const SecurityIdentity &rhs) const;
std::string username;
std::string host;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment