From 984eb9c27a34c7c55fb26b5550627b776122b9f8 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Fri, 15 Aug 2008 21:15:41 +0100 Subject: [PATCH] Just comments. --- csharp/ProtocolBuffers/AbstractBuilder.cs | 2 +- .../protobuf/compiler/csharp/csharp_primitive_field.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/ProtocolBuffers/AbstractBuilder.cs b/csharp/ProtocolBuffers/AbstractBuilder.cs index a83afa6e67..11a8297476 100644 --- a/csharp/ProtocolBuffers/AbstractBuilder.cs +++ b/csharp/ProtocolBuffers/AbstractBuilder.cs @@ -121,7 +121,7 @@ namespace Google.ProtocolBuffers { // them to insure that they don't change after verification (since // the Message interface itself cannot enforce immutability of // implementations). - // TODO(jonskeet): Provide a function somewhere called makeDeepCopy() + // TODO(jonskeet): Provide a function somewhere called MakeDeepCopy() // which allows people to make secure deep copies of messages. foreach (KeyValuePair entry in other.AllFields) { FieldDescriptor field = entry.Key; diff --git a/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc b/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc index 65ddf0e724..4bd6f49944 100644 --- a/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc +++ b/src/google/protobuf/compiler/csharp/csharp_primitive_field.cc @@ -243,10 +243,10 @@ GenerateMembers(io::Printer* printer) const { "public scg::IList<$type$> $capitalized_name$List {\r\n" " get { return $name$_; }\r\n" // note: unmodifiable list "}\r\n" - "public int $capitalized_name$Count {\r\n" // TODO(jonskeet): Remove? + "public int $capitalized_name$Count {\r\n" " get { return $name$_.Count; }\r\n" "}\r\n" - "public $type$ Get$capitalized_name$(int index) {\r\n" // TODO(jonskeet): Remove? + "public $type$ Get$capitalized_name$(int index) {\r\n" " return $name$_[index];\r\n" "}\r\n"); } @@ -257,7 +257,7 @@ GenerateBuilderMembers(io::Printer* printer) const { // Note: We return an unmodifiable list because otherwise the caller // could hold on to the returned list and modify it after the message // has been built, thus mutating the message which is supposed to be - // immutable. + // immutable. This unfortunately limits the use for collection initializers... "public scg::IList<$type$> $capitalized_name$List {\r\n" " get { return pbc::Lists<$type$>.AsReadOnly(result.$name$_); }\r\n" "}\r\n"