Chromium Code Reviews| Index: blimp/net/helium/vector_clock.cc |
| diff --git a/blimp/net/helium/vector_clock.cc b/blimp/net/helium/vector_clock.cc |
| index 6b13d28745bd93e1ddb8793b4097e0c275709e98..15c51c665b544fe8a75509adb7fb1274fc8ebc2e 100644 |
| --- a/blimp/net/helium/vector_clock.cc |
| +++ b/blimp/net/helium/vector_clock.cc |
| @@ -54,4 +54,18 @@ void VectorClock::IncrementLocal() { |
| local_revision_++; |
| } |
| +proto::VectorClockMessage VectorClock::ToProto() const { |
| + proto::VectorClockMessage result; |
| + result.set_local_revision(local_revision_); |
| + result.set_remote_revision(remote_revision_); |
| + return result; |
| +} |
| + |
| +VectorClock VectorClock::Invert() const { |
| + VectorClock result; |
|
steimel
2016/10/06 17:44:33
Would it make more sense to use the other construc
scf
2016/10/06 19:47:17
good catch
|
| + result.set_local_revision(remote_revision_); |
| + result.set_remote_revision(local_revision_); |
| + return result; |
| +} |
| + |
| } // namespace blimp |