diff options
author | Jon Skeet <jonskeet@google.com> | 2017-10-25 16:04:45 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2017-12-09 09:49:24 +0000 |
commit | 31c54d1289f2ae44158eff631526762366ba1707 (patch) | |
tree | 22375c89847cad789c63dd306c5ad50d04d511ab /csharp/src/Google.Protobuf/WellKnownTypes | |
parent | 3e5bd2fd240a28d7a8bfab5447e664189e06434b (diff) | |
download | protobuf-31c54d1289f2ae44158eff631526762366ba1707.tar.gz protobuf-31c54d1289f2ae44158eff631526762366ba1707.tar.bz2 protobuf-31c54d1289f2ae44158eff631526762366ba1707.zip |
Regenerated code from previous C# codegen commit
With this in place, all tests should pass.
Fixes #3725.
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes')
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs | 4 | ||||
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs index 65119894..8468f74e 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs @@ -368,7 +368,7 @@ namespace Google.Protobuf.WellKnownTypes { return true; } if (NullValue != other.NullValue) return false; - if (NumberValue != other.NumberValue) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(NumberValue, other.NumberValue)) return false; if (StringValue != other.StringValue) return false; if (BoolValue != other.BoolValue) return false; if (!object.Equals(StructValue, other.StructValue)) return false; @@ -381,7 +381,7 @@ namespace Google.Protobuf.WellKnownTypes { public override int GetHashCode() { int hash = 1; if (kindCase_ == KindOneofCase.NullValue) hash ^= NullValue.GetHashCode(); - if (kindCase_ == KindOneofCase.NumberValue) hash ^= NumberValue.GetHashCode(); + if (kindCase_ == KindOneofCase.NumberValue) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(NumberValue); if (kindCase_ == KindOneofCase.StringValue) hash ^= StringValue.GetHashCode(); if (kindCase_ == KindOneofCase.BoolValue) hash ^= BoolValue.GetHashCode(); if (kindCase_ == KindOneofCase.StructValue) hash ^= StructValue.GetHashCode(); diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs index 9a5fb81e..960cfdee 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Wrappers.cs @@ -114,14 +114,14 @@ namespace Google.Protobuf.WellKnownTypes { if (ReferenceEquals(other, this)) { return true; } - if (Value != other.Value) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Value, other.Value)) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Value != 0D) hash ^= Value.GetHashCode(); + if (Value != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Value); return hash; } @@ -239,14 +239,14 @@ namespace Google.Protobuf.WellKnownTypes { if (ReferenceEquals(other, this)) { return true; } - if (Value != other.Value) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Value, other.Value)) return false; return true; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override int GetHashCode() { int hash = 1; - if (Value != 0F) hash ^= Value.GetHashCode(); + if (Value != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Value); return hash; } |