diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2015-04-13 15:28:43 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2015-04-13 15:28:43 -0700 |
commit | d92de1742d2bbc77058637709140717e00f011da (patch) | |
tree | 395b6420cceea700ae3f78972b29775d025f4643 /src | |
parent | f61e1791c0df2a518103b5924ee76098d5b72fab (diff) | |
download | protobuf-d92de1742d2bbc77058637709140717e00f011da.tar.gz protobuf-d92de1742d2bbc77058637709140717e00f011da.tar.bz2 protobuf-d92de1742d2bbc77058637709140717e00f011da.zip |
creating private ctor for builders is now the default (as it used to be for old codegen)
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_message.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 7156c9e5..66b8c2d5 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -181,6 +181,7 @@ void MessageGenerator::Generate(Writer* writer) { descriptor_->extension_range_count() > 0 ? "Extendable" : "Generated", runtime_suffix()); writer->Indent(); + writer->WriteLine("private $0$() { }", class_name()); // Private ctor. // Must call MakeReadOnly() to make sure all lists are made read-only writer->WriteLine( "private static readonly $0$ defaultInstance = new $0$().MakeReadOnly();", |