aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/AddressBook
diff options
context:
space:
mode:
authorGravatar Jon Skeet <jonskeet@google.com>2015-06-25 12:08:55 +0100
committerGravatar Jon Skeet <jonskeet@google.com>2015-06-25 12:08:55 +0100
commit3e7d70cb699e93a485ef11fce034f4767aac4b8f (patch)
tree2a55c0786724988a72bd8f2d3001428b53b334ca /csharp/src/AddressBook
parentdf44ae4413109a7c3ce9f27fb7ae02f0414c29d9 (diff)
Generated code changes due to map changes.
(Primarily this is starting the hash code of messages at a non-zero value...)
Diffstat (limited to 'csharp/src/AddressBook')
-rw-r--r--csharp/src/AddressBook/Addressbook.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/csharp/src/AddressBook/Addressbook.cs b/csharp/src/AddressBook/Addressbook.cs
index 2fb6be83..2b430262 100644
--- a/csharp/src/AddressBook/Addressbook.cs
+++ b/csharp/src/AddressBook/Addressbook.cs
@@ -155,7 +155,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
public override int GetHashCode() {
- int hash = 0;
+ int hash = 17;
if (Name.Length != 0) hash ^= Name.GetHashCode();
if (Id != 0) hash ^= Id.GetHashCode();
if (Email.Length != 0) hash ^= Email.GetHashCode();
@@ -200,6 +200,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
return size;
}
+
public void MergeFrom(Person other) {
if (other == null) {
return;
@@ -329,7 +330,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
public override int GetHashCode() {
- int hash = 0;
+ int hash = 17;
if (Number.Length != 0) hash ^= Number.GetHashCode();
if (Type != global::Google.ProtocolBuffers.Examples.AddressBook.Person.Types.PhoneType.HOME) hash ^= Type.GetHashCode();
return hash;
@@ -356,6 +357,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
return size;
}
+
public void MergeFrom(PhoneNumber other) {
if (other == null) {
return;
@@ -456,7 +458,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
public override int GetHashCode() {
- int hash = 0;
+ int hash = 17;
hash ^= person_.GetHashCode();
return hash;
}
@@ -477,6 +479,7 @@ namespace Google.ProtocolBuffers.Examples.AddressBook {
}
return size;
}
+
public void MergeFrom(AddressBook other) {
if (other == null) {
return;