From 883c643baf3a1698f0f0a31a8973b61411cd311f Mon Sep 17 00:00:00 2001 From: filmih <filmih@yandex-team.ru> Date: Thu, 10 Feb 2022 16:49:59 +0300 Subject: Restoring authorship annotation for <filmih@yandex-team.ru>. Commit 1 of 2. --- library/cpp/protobuf/util/pb_io.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'library/cpp/protobuf/util/pb_io.cpp') diff --git a/library/cpp/protobuf/util/pb_io.cpp b/library/cpp/protobuf/util/pb_io.cpp index 6270ee0624..bbedfa16fa 100644 --- a/library/cpp/protobuf/util/pb_io.cpp +++ b/library/cpp/protobuf/util/pb_io.cpp @@ -118,18 +118,18 @@ void SerializeToTextFormatWithEnumId(const NProtoBuf::Message& m, IOutputStream& } } -void SerializeToTextFormatPretty(const NProtoBuf::Message& m, IOutputStream& out) { - google::protobuf::TextFormat::Printer printer; - printer.SetUseUtf8StringEscaping(true); - printer.SetUseShortRepeatedPrimitives(true); - - NProtoBuf::io::TCopyingOutputStreamAdaptor adaptor(&out); - - if (!printer.Print(m, &adaptor)) { - ythrow yexception() << "SerializeToTextFormatPretty failed on Print"; - } -} - +void SerializeToTextFormatPretty(const NProtoBuf::Message& m, IOutputStream& out) { + google::protobuf::TextFormat::Printer printer; + printer.SetUseUtf8StringEscaping(true); + printer.SetUseShortRepeatedPrimitives(true); + + NProtoBuf::io::TCopyingOutputStreamAdaptor adaptor(&out); + + if (!printer.Print(m, &adaptor)) { + ythrow yexception() << "SerializeToTextFormatPretty failed on Print"; + } +} + static void ConfigureParser(const EParseFromTextFormatOptions options, NProtoBuf::TextFormat::Parser& p) { if (options & EParseFromTextFormatOption::AllowUnknownField) { -- cgit v1.2.3