diff options
author | Jon Skeet <jonskeet@google.com> | 2015-07-30 13:15:45 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-07-30 13:15:45 +0100 |
commit | f03271665f4085b60ed41447f7ce3b0e0224be5d (patch) | |
tree | 6f4f4be255885cbfc8d24e80ca1c4eb7a07d9200 | |
parent | 3b2fe97b6f39beb3b08e089f9e68595051e88ce3 (diff) | |
download | protobuf-f03271665f4085b60ed41447f7ce3b0e0224be5d.tar.gz protobuf-f03271665f4085b60ed41447f7ce3b0e0224be5d.tar.bz2 protobuf-f03271665f4085b60ed41447f7ce3b0e0224be5d.zip |
More freezing tidy-up; generated code in next commit.
-rw-r--r-- | csharp/src/Google.Protobuf/Collections/RepeatedField.cs | 3 | ||||
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_message.cc | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs index 60ab5ed8..3ce19c81 100644 --- a/csharp/src/Google.Protobuf/Collections/RepeatedField.cs +++ b/csharp/src/Google.Protobuf/Collections/RepeatedField.cs @@ -40,7 +40,7 @@ namespace Google.Protobuf.Collections { /// <summary> /// The contents of a repeated field: essentially, a collection with some extra - /// restrictions (no null values) and capabilities (deep cloning and freezing). + /// restrictions (no null values) and capabilities (deep cloning). /// </summary> /// <typeparam name="T">The element type of the repeated field.</typeparam> public sealed class RepeatedField<T> : IList<T>, IList, IDeepCloneable<RepeatedField<T>>, IEquatable<RepeatedField<T>> @@ -65,7 +65,6 @@ namespace Google.Protobuf.Collections public RepeatedField<T> Clone() { RepeatedField<T> clone = new RepeatedField<T>(); - // Clone is implicitly *not* frozen, even if this object is. if (array != EmptyArray) { clone.array = (T[])array.Clone(); diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 86ef0489..54e7d92d 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -134,9 +134,7 @@ void MessageGenerator::Generate(io::Printer* printer) { "pbr::MessageDescriptor pb::IMessage.Descriptor {\n" " get { return Descriptor; }\n" "}\n" - "\n" - "private bool _frozen = false;\n" - "public bool IsFrozen { get { return _frozen; } }\n\n"); + "\n"); // Parameterless constructor and partial OnConstruction method. printer->Print( |