| Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h
|
| index 00dc25d4cf5a5e26d441aff6b955b54f218eec10..3b01252780da26393e0056c802f068bea1b7f044 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h
|
| @@ -61,11 +61,11 @@ namespace cpp {
|
| // ['name', 'index', 'number', 'classname', 'declared_type', 'tag_size',
|
| // 'deprecation'].
|
| void SetCommonFieldVariables(const FieldDescriptor* descriptor,
|
| - std::map<string, string>* variables,
|
| + map<string, string>* variables,
|
| const Options& options);
|
|
|
| void SetCommonOneofFieldVariables(const FieldDescriptor* descriptor,
|
| - std::map<string, string>* variables);
|
| + map<string, string>* variables);
|
|
|
| class FieldGenerator {
|
| public:
|
| @@ -124,20 +124,10 @@ class FieldGenerator {
|
| io::Printer* /*printer*/) const {}
|
|
|
| // Generate lines of code (statements, not declarations) which clear the
|
| - // field. This is used to define the clear_$name$() method
|
| + // field. This is used to define the clear_$name$() method as well as
|
| + // the Clear() method for the whole message.
|
| virtual void GenerateClearingCode(io::Printer* printer) const = 0;
|
|
|
| - // Generate lines of code (statements, not declarations) which clear the field
|
| - // as part of the Clear() method for the whole message. For message types
|
| - // which have field presence bits, MessageGenerator::GenerateClear will have
|
| - // already checked the presence bits.
|
| - //
|
| - // Since most field types can re-use GenerateClearingCode, this method is not
|
| - // pure virtual.
|
| - virtual void GenerateMessageClearingCode(io::Printer* printer) const {
|
| - GenerateClearingCode(printer);
|
| - }
|
| -
|
| // Generate lines of code (statements, not declarations) which merges the
|
| // contents of the field from the current message to the target message,
|
| // which is stored in the generated code variable "from".
|
| @@ -146,9 +136,6 @@ class FieldGenerator {
|
| // GenerateMergeFrom method.
|
| virtual void GenerateMergingCode(io::Printer* printer) const = 0;
|
|
|
| - // Generates a copy constructor
|
| - virtual void GenerateCopyConstructorCode(io::Printer* printer) const = 0;
|
| -
|
| // Generate lines of code (statements, not declarations) which swaps
|
| // this field and the corresponding field of another message, which
|
| // is stored in the generated code variable "other". This is used to
|
|
|