Skip to content
Snippets Groups Projects
Commit a36d602d authored by Jan Trávníček's avatar Jan Trávníček
Browse files

speedup comparison on shared objects

parent 78533b57
No related branches found
No related tags found
No related merge requests found
......@@ -45,26 +45,32 @@ public:
}
 
bool operator>=(const wrapper& other) const {
if(this->data.get() == other.data.get()) return true;
return *(this->data) >= *(other.data);
}
 
bool operator<=(const wrapper& other) const {
if(this->data.get() == other.data.get()) return true;
return *(this->data) <= *(other.data);
}
 
bool operator>(const wrapper& other) const {
if(this->data.get() == other.data.get()) return false;
return *(this->data) > *(other.data);
}
 
bool operator<(const wrapper& other) const {
if(this->data.get() == other.data.get()) return false;
return *(this->data) < *(other.data);
}
 
bool operator!=(const wrapper& other) const {
if(this->data.get() == other.data.get()) return false;
return *(this->data) != *(other.data);
}
 
bool operator==(const wrapper& other) const {
if(this->data.get() == other.data.get()) return true;
return *(this->data) == *(other.data);
}
 
......
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