diff options
author | Jon Skeet <jonskeet@google.com> | 2015-06-25 12:08:18 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-06-25 12:08:18 +0100 |
commit | df44ae4413109a7c3ce9f27fb7ae02f0414c29d9 (patch) | |
tree | 95554e77d4c4847a278fa645206be2054ca864c2 /src | |
parent | e36e601a394e96759a9ccf0eda97c0451c49c2cc (diff) | |
download | protobuf-df44ae4413109a7c3ce9f27fb7ae02f0414c29d9.tar.gz protobuf-df44ae4413109a7c3ce9f27fb7ae02f0414c29d9.tar.bz2 protobuf-df44ae4413109a7c3ce9f27fb7ae02f0414c29d9.zip |
More map tests, and various production code improvements.
Generated code in next commit.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_message.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 3cb91951..9e055f64 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -405,9 +405,10 @@ void MessageGenerator::GenerateFrameworkMethods(io::Printer* printer) { "}\n\n"); // GetHashCode + // Start with a non-zero value to easily distinguish between null and "empty" messages. printer->Print( "public override int GetHashCode() {\n" - " int hash = 0;\n"); + " int hash = 17;\n"); printer->Indent(); for (int i = 0; i < descriptor_->field_count(); i++) { scoped_ptr<FieldGeneratorBase> generator( |