Commit 5a811ac6 authored by Jie Luo's avatar Jie Luo

fix bug for Field Presence

parent 856ced5d
...@@ -170,7 +170,7 @@ void EnumFieldGenerator::WriteHash(Writer* writer) { ...@@ -170,7 +170,7 @@ void EnumFieldGenerator::WriteHash(Writer* writer) {
} else { } else {
writer->WriteLine("if ($0$ != $1$) {", property_name(), default_value()); writer->WriteLine("if ($0$ != $1$) {", property_name(), default_value());
} }
writer->WriteLine(" hash ^= $1$_.GetHashCode();", name()); writer->WriteLine(" hash ^= $0$_.GetHashCode();", name());
writer->WriteLine("}"); writer->WriteLine("}");
} }
void EnumFieldGenerator::WriteEquals(Writer* writer) { void EnumFieldGenerator::WriteEquals(Writer* writer) {
......
...@@ -161,7 +161,7 @@ void PrimitiveFieldGenerator::WriteHash(Writer* writer) { ...@@ -161,7 +161,7 @@ void PrimitiveFieldGenerator::WriteHash(Writer* writer) {
} else { } else {
writer->WriteLine("if ($0$ != $1$) {", property_name(), default_value()); writer->WriteLine("if ($0$ != $1$) {", property_name(), default_value());
} }
writer->WriteLine(" hash ^= $1$_.GetHashCode();", name()); writer->WriteLine(" hash ^= $0$_.GetHashCode();", name());
writer->WriteLine("}"); writer->WriteLine("}");
} }
void PrimitiveFieldGenerator::WriteEquals(Writer* writer) { void PrimitiveFieldGenerator::WriteEquals(Writer* writer) {
......
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