@@ -113,7 +113,7 @@ std::string TypeName(const FieldDescriptor* field) {
113113 }
114114}
115115
116- string StringifySyntax (FileDescriptor::Syntax syntax) {
116+ std:: string StringifySyntax (FileDescriptor::Syntax syntax) {
117117 switch (syntax) {
118118 case FileDescriptor::SYNTAX_PROTO2:
119119 return " proto2" ;
@@ -147,7 +147,7 @@ std::string DefaultValueForField(const FieldDescriptor* field) {
147147 return NumberToString (field->default_value_enum ()->number ());
148148 case FieldDescriptor::CPPTYPE_STRING: {
149149 std::ostringstream os;
150- string default_str = field->default_value_string ();
150+ std:: string default_str = field->default_value_string ();
151151
152152 if (field->type () == FieldDescriptor::TYPE_STRING) {
153153 os << " \" " << default_str << " \" " ;
@@ -426,14 +426,14 @@ int GeneratePackageModules(const FileDescriptor* file, io::Printer* printer) {
426426 }
427427
428428 // Use the appropriate delimiter
429- string delimiter = need_change_to_module ? " ." : " ::" ;
429+ std:: string delimiter = need_change_to_module ? " ." : " ::" ;
430430 int delimiter_size = need_change_to_module ? 1 : 2 ;
431431
432432 // Extract each module name and indent
433433 while (!package_name.empty ()) {
434434 size_t dot_index = package_name.find (delimiter);
435- string component;
436- if (dot_index == string::npos) {
435+ std:: string component;
436+ if (dot_index == std:: string::npos) {
437437 component = package_name;
438438 package_name = " " ;
439439 } else {
@@ -462,7 +462,7 @@ void EndPackageModules(int levels, io::Printer* printer) {
462462}
463463
464464bool UsesTypeFromFile (const Descriptor* message, const FileDescriptor* file,
465- string* error) {
465+ std:: string* error) {
466466 for (int i = 0 ; i < message->field_count (); i++) {
467467 const FieldDescriptor* field = message->field (i);
468468 if ((field->cpp_type () == FieldDescriptor::CPPTYPE_MESSAGE &&
@@ -499,7 +499,7 @@ bool UsesTypeFromFile(const Descriptor* message, const FileDescriptor* file,
499499bool MaybeEmitDependency (const FileDescriptor* import ,
500500 const FileDescriptor* from,
501501 io::Printer* printer,
502- string* error) {
502+ std:: string* error) {
503503 if (from->syntax () == FileDescriptor::SYNTAX_PROTO3 &&
504504 import ->syntax () == FileDescriptor::SYNTAX_PROTO2) {
505505 for (int i = 0 ; i < from->message_type_count (); i++) {
@@ -524,7 +524,7 @@ bool MaybeEmitDependency(const FileDescriptor* import,
524524}
525525
526526bool GenerateFile (const FileDescriptor* file, io::Printer* printer,
527- string* error) {
527+ std:: string* error) {
528528 printer->Print (
529529 " # Generated by the protocol buffer compiler. DO NOT EDIT!\n "
530530 " # source: $filename$\n "
@@ -580,9 +580,9 @@ bool GenerateFile(const FileDescriptor* file, io::Printer* printer,
580580
581581bool Generator::Generate (
582582 const FileDescriptor* file,
583- const string& parameter,
583+ const std:: string& parameter,
584584 GeneratorContext* generator_context,
585- string* error) const {
585+ std:: string* error) const {
586586
587587 if (file->syntax () != FileDescriptor::SYNTAX_PROTO3 &&
588588 file->syntax () != FileDescriptor::SYNTAX_PROTO2) {
0 commit comments