diff options
author | eeight <eeight@yandex-team.ru> | 2022-02-10 16:46:19 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:19 +0300 |
commit | bd085aee9b4f7a0bee302ce687964ffb7098f986 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/protobuf | |
parent | 475c0a46f28166e83fd263badc7546377cddcabe (diff) | |
download | ydb-bd085aee9b4f7a0bee302ce687964ffb7098f986.tar.gz |
Restoring authorship annotation for <eeight@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/protobuf')
-rw-r--r-- | contrib/libs/protobuf/src/google/protobuf/messagext.cc | 12 | ||||
-rw-r--r-- | contrib/libs/protobuf/src/google/protobuf/messagext.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.cc b/contrib/libs/protobuf/src/google/protobuf/messagext.cc index a47b53558a..1923205598 100644 --- a/contrib/libs/protobuf/src/google/protobuf/messagext.cc +++ b/contrib/libs/protobuf/src/google/protobuf/messagext.cc @@ -167,11 +167,11 @@ private: }; void TProtoSerializer::Load(IInputStream* input, Message& msg) { - msg.Clear(); - MergeFrom(input, msg); -} - -void TProtoSerializer::MergeFrom(IInputStream* input, Message& msg) { + msg.Clear(); + MergeFrom(input, msg); +} + +void TProtoSerializer::MergeFrom(IInputStream* input, Message& msg) { ui32 size; if (!ReadVarint32(input, size)) ythrow yexception() << "Stream is exhausted"; @@ -180,7 +180,7 @@ void TProtoSerializer::MergeFrom(IInputStream* input, Message& msg) { ::LoadPodArray(input, buf.Data(), size); CodedInputStream decoder(buf.Data(), size); decoder.SetTotalBytesLimit(MaxSizeBytes); - if (!msg.MergeFromCodedStream(&decoder)) + if (!msg.MergeFromCodedStream(&decoder)) ythrow yexception() << "Cannot read protobuf::Message (" << msg.GetTypeName() << ") from input stream"; } diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.h b/contrib/libs/protobuf/src/google/protobuf/messagext.h index e414c0ecd6..9176cee1e8 100644 --- a/contrib/libs/protobuf/src/google/protobuf/messagext.h +++ b/contrib/libs/protobuf/src/google/protobuf/messagext.h @@ -108,7 +108,7 @@ class TProtoSerializer { public: static void Save(IOutputStream* output, const Message& msg); static void Load(IInputStream* input, Message& msg); - static void MergeFrom(IInputStream* input, Message& msg); + static void MergeFrom(IInputStream* input, Message& msg); // similar interface for protobuf coded streams static inline bool Save(CodedOutputStream* output, const Message& msg) { |