OLD | NEW |
---|---|
(Empty) | |
1 diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protob uf/compiler/cpp/cpp_message.cc | |
2 index efc56dd..6743ac5 100644 | |
3 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc | |
4 +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc | |
5 @@ -1565,12 +1565,6 @@ GenerateInlineMethods(io::Printer* printer, bool is_inlin e) { | |
6 "_oneof_case_[$oneof_index$]);\n" | |
7 "}\n"); | |
8 } | |
9 - | |
10 - printer->Print( | |
11 - "inline const $classname$* $classname$::internal_default_instance() {\n" | |
12 - " return &$classname$_default_instance_.get();\n" | |
Peter Kasting
2016/11/22 20:28:23
Is this needed because the relevant _default_insta
jbriance
2016/11/22 22:11:31
Yes, when "is_component_build=true" I get link err
| |
13 - "}\n", | |
14 - "classname", classname_); | |
15 } | |
16 | |
17 void MessageGenerator:: | |
18 @@ -2441,6 +2435,12 @@ GenerateStructors(io::Printer* printer) { | |
19 "\n", | |
20 "classname", classname_); | |
21 | |
22 + printer->Print( | |
23 + "const $classname$* $classname$::internal_default_instance() {\n" | |
24 + " return &$classname$_default_instance_.get();\n" | |
25 + "}\n", | |
26 + "classname", classname_); | |
27 + | |
28 if (SupportsArenas(descriptor_)) { | |
29 printer->Print( | |
30 "$classname$* $classname$::New(::google::protobuf::Arena* arena) const {\ n" | |
OLD | NEW |