From 37c7426b4782ea01f40875b30782ab5ef0ac99b6 Mon Sep 17 00:00:00 2001 From: "xiaofeng@google.com" Date: Thu, 13 Feb 2014 22:09:48 +0000 Subject: Replace kEmptyString wth OnceInit initialized string* --- src/google/protobuf/compiler/cpp/cpp_string_field.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/google/protobuf/compiler/cpp/cpp_string_field.cc') diff --git a/src/google/protobuf/compiler/cpp/cpp_string_field.cc b/src/google/protobuf/compiler/cpp/cpp_string_field.cc index 9c0911ac..0b58b981 100644 --- a/src/google/protobuf/compiler/cpp/cpp_string_field.cc +++ b/src/google/protobuf/compiler/cpp/cpp_string_field.cc @@ -53,7 +53,7 @@ void SetStringVariables(const FieldDescriptor* descriptor, (*variables)["default_length"] = SimpleItoa(descriptor->default_value_string().length()); (*variables)["default_variable"] = descriptor->default_value_string().empty() - ? "&::google::protobuf::internal::kEmptyString" + ? "&::google::protobuf::internal::GetEmptyString()" : "_default_" + FieldName(descriptor) + "_"; (*variables)["pointer_type"] = descriptor->type() == FieldDescriptor::TYPE_BYTES ? "void" : "char"; -- cgit v1.2.3