Commit 3e7d70cb authored by Jon Skeet's avatar Jon Skeet

Generated code changes due to map changes.

(Primarily this is starting the hash code of messages at a non-zero value...)
parent df44ae44
......@@ -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;
......
......@@ -120,7 +120,7 @@ namespace Google.Protobuf.TestProtos {
}
public override int GetHashCode() {
int hash = 0;
int hash = 17;
if (D != 0) hash ^= D.GetHashCode();
return hash;
}
......@@ -139,6 +139,7 @@ namespace Google.Protobuf.TestProtos {
}
return size;
}
public void MergeFrom(ImportMessage other) {
if (other == null) {
return;
......
......@@ -105,7 +105,7 @@ namespace Google.Protobuf.TestProtos {
}
public override int GetHashCode() {
int hash = 0;
int hash = 17;
if (E != 0) hash ^= E.GetHashCode();
return hash;
}
......@@ -124,6 +124,7 @@ namespace Google.Protobuf.TestProtos {
}
return size;
}
public void MergeFrom(PublicImportMessage other) {
if (other == null) {
return;
......
......@@ -168,7 +168,7 @@ namespace UnitTest.Issues.TestProtos {
}
public override int GetHashCode() {
int hash = 0;
int hash = 17;
if (Value != global::UnitTest.Issues.TestProtos.NegativeEnum.NEGATIVE_ENUM_ZERO) hash ^= Value.GetHashCode();
hash ^= values_.GetHashCode();
hash ^= packedValues_.GetHashCode();
......@@ -212,6 +212,7 @@ namespace UnitTest.Issues.TestProtos {
}
return size;
}
public void MergeFrom(NegativeEnumMessage other) {
if (other == null) {
return;
......@@ -303,7 +304,7 @@ namespace UnitTest.Issues.TestProtos {
}
public override int GetHashCode() {
int hash = 0;
int hash = 17;
return hash;
}
......@@ -314,6 +315,7 @@ namespace UnitTest.Issues.TestProtos {
int size = 0;
return size;
}
public void MergeFrom(DeprecatedChild other) {
if (other == null) {
return;
......@@ -456,7 +458,7 @@ namespace UnitTest.Issues.TestProtos {
}
public override int GetHashCode() {
int hash = 0;
int hash = 17;
if (PrimitiveValue != 0) hash ^= PrimitiveValue.GetHashCode();
hash ^= primitiveArray_.GetHashCode();
if (messageValue_ != null) hash ^= MessageValue.GetHashCode();
......@@ -527,6 +529,7 @@ namespace UnitTest.Issues.TestProtos {
}
return size;
}
public void MergeFrom(DeprecatedFieldsMessage other) {
if (other == null) {
return;
......@@ -655,7 +658,7 @@ namespace UnitTest.Issues.TestProtos {
}
public override int GetHashCode() {
int hash = 0;
int hash = 17;
if (Item != 0) hash ^= Item.GetHashCode();
return hash;
}
......@@ -674,6 +677,7 @@ namespace UnitTest.Issues.TestProtos {
}
return size;
}
public void MergeFrom(ItemField other) {
if (other == null) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment