///////////////////////////////////////////////////////////////////////////
| 48 | |
| 49 | //////////////////////////////////////////////////////////////////////////////// |
| 50 | bool Operation::operator<(const Operation& other) const { |
| 51 | if (is_create()) { |
| 52 | return !other.is_create(); |
| 53 | } else if (is_update()) { |
| 54 | if (other.is_create()) { |
| 55 | return false; |
| 56 | } else if (other.is_update()) { |
| 57 | return get_timestamp() < other.get_timestamp(); |
| 58 | } else { |
| 59 | return true; |
| 60 | } |
| 61 | } else if (is_delete()) { |
| 62 | if (other.is_create() || other.is_update() || other.is_delete()) { |
| 63 | return false; |
| 64 | } else { |
| 65 | return true; |
| 66 | } |
| 67 | } else if (is_undo_point()) { |
| 68 | return !other.is_undo_point(); |
| 69 | } |
| 70 | return false; // not reachable |
| 71 | } |
| 72 | |
| 73 | //////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected