aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/cpp/cpp_helpers.cc
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2017-10-18 12:22:18 -0700
committerJisi Liu <jisi.liu@gmail.com>2017-10-18 12:22:18 -0700
commit1a7a7fca804afa1cf67f8be5e71092898ba40334 (patch)
tree04b3da27c71c607510f34a12cf7856a1b94181ae /src/google/protobuf/compiler/cpp/cpp_helpers.cc
parentc4f59dcc5c13debc572154c8f636b8a9361aacde (diff)
downloadprotobuf-1a7a7fca804afa1cf67f8be5e71092898ba40334.tar.gz
protobuf-1a7a7fca804afa1cf67f8be5e71092898ba40334.tar.bz2
protobuf-1a7a7fca804afa1cf67f8be5e71092898ba40334.zip
Merge from google internal
Diffstat (limited to 'src/google/protobuf/compiler/cpp/cpp_helpers.cc')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_helpers.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_helpers.cc b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
index 4aa77d06..96950e52 100644
--- a/src/google/protobuf/compiler/cpp/cpp_helpers.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_helpers.cc
@@ -216,7 +216,7 @@ string DefaultInstanceName(const Descriptor* descriptor) {
}
string ReferenceFunctionName(const Descriptor* descriptor) {
- return QualifiedClassName(descriptor) + "_Reference";
+ return QualifiedClassName(descriptor) + "_ReferenceStrong";
}
string DependentBaseClassTemplateName(const Descriptor* descriptor) {
@@ -753,8 +753,7 @@ bool IsImplicitWeakField(const FieldDescriptor* field, const Options& options) {
return UsingImplicitWeakFields(field->file(), options) &&
field->type() == FieldDescriptor::TYPE_MESSAGE &&
!field->is_required() && !field->is_repeated() && !field->is_map() &&
- field->containing_oneof() == NULL &&
- field->message_type()->file() != field->file();
+ field->containing_oneof() == NULL;
}
struct CompareDescriptors {