aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/text_format.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/text_format.cc')
-rw-r--r--src/google/protobuf/text_format.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/google/protobuf/text_format.cc b/src/google/protobuf/text_format.cc
index 8e867c09..ec070c51 100644
--- a/src/google/protobuf/text_format.cc
+++ b/src/google/protobuf/text_format.cc
@@ -1360,9 +1360,8 @@ void TextFormat::Printer::SetDefaultFieldValuePrinter(
bool TextFormat::Printer::RegisterFieldValuePrinter(
const FieldDescriptor* field,
const FieldValuePrinter* printer) {
- return field != NULL
- && printer != NULL
- && custom_printers_.insert(make_pair(field, printer)).second;
+ return field != NULL && printer != NULL &&
+ custom_printers_.insert(std::make_pair(field, printer)).second;
}
bool TextFormat::Printer::PrintToString(const Message& message,
@@ -1422,7 +1421,7 @@ void TextFormat::Printer::Print(const Message& message,
vector<const FieldDescriptor*> fields;
reflection->ListFields(message, &fields);
if (print_message_fields_in_index_order_) {
- sort(fields.begin(), fields.end(), FieldIndexSorter());
+ std::sort(fields.begin(), fields.end(), FieldIndexSorter());
}
for (int i = 0; i < fields.size(); i++) {
PrintField(message, reflection, fields[i], generator);