diff options
author | ermolovd <ermolovd@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:53 +0300 |
commit | 2a4a975b112fa0fa138abc7457fe67e0e1e7fd02 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /contrib | |
parent | b91bcef7c99a119b0846479ef71bfab4beec72ca (diff) | |
download | ydb-2a4a975b112fa0fa138abc7457fe67e0e1e7fd02.tar.gz |
Restoring authorship annotation for <ermolovd@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libs/protobuf/src/google/protobuf/messagext.cc | 54 | ||||
-rw-r--r-- | contrib/libs/protobuf/src/google/protobuf/messagext.h | 4 |
2 files changed, 29 insertions, 29 deletions
diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.cc b/contrib/libs/protobuf/src/google/protobuf/messagext.cc index 613b1ca114..1923205598 100644 --- a/contrib/libs/protobuf/src/google/protobuf/messagext.cc +++ b/contrib/libs/protobuf/src/google/protobuf/messagext.cc @@ -74,33 +74,33 @@ bool SerializeToZeroCopyStreamSeq(const Message* msg, io::ZeroCopyOutputStream* } -int TInputStreamProxy::Read(void* buffer, int size) { - try { - return (int)mSlave->Read(buffer, (size_t)size); - } catch (const yexception& e) { - GOOGLE_LOG(ERROR) << e.what(); - } catch (...) { - GOOGLE_LOG(ERROR) << "unknown exception caught"; - } - TErrorState::SetError(); - return -1; -} - - -bool TOutputStreamProxy::Write(const void* buffer, int size) { - try { - mSlave->Write(buffer, (size_t)size); - return true; - } catch (const yexception& e) { - GOOGLE_LOG(ERROR) << e.what(); - } catch (...) { - GOOGLE_LOG(ERROR) << "unknown exception caught"; - } - TErrorState::SetError(); - return false; -} - - +int TInputStreamProxy::Read(void* buffer, int size) { + try { + return (int)mSlave->Read(buffer, (size_t)size); + } catch (const yexception& e) { + GOOGLE_LOG(ERROR) << e.what(); + } catch (...) { + GOOGLE_LOG(ERROR) << "unknown exception caught"; + } + TErrorState::SetError(); + return -1; +} + + +bool TOutputStreamProxy::Write(const void* buffer, int size) { + try { + mSlave->Write(buffer, (size_t)size); + return true; + } catch (const yexception& e) { + GOOGLE_LOG(ERROR) << e.what(); + } catch (...) { + GOOGLE_LOG(ERROR) << "unknown exception caught"; + } + TErrorState::SetError(); + return false; +} + + void TProtoSerializer::Save(IOutputStream* out, const Message& msg) { int size = msg.ByteSize(); if (size > MaxSizeBytes) { diff --git a/contrib/libs/protobuf/src/google/protobuf/messagext.h b/contrib/libs/protobuf/src/google/protobuf/messagext.h index 7cac1f9668..9176cee1e8 100644 --- a/contrib/libs/protobuf/src/google/protobuf/messagext.h +++ b/contrib/libs/protobuf/src/google/protobuf/messagext.h @@ -67,7 +67,7 @@ class TInputStreamProxy: public io::CopyingInputStream, public TErrorState { { } - virtual int Read(void* buffer, int size); + virtual int Read(void* buffer, int size); private: IInputStream* mSlave; @@ -80,7 +80,7 @@ class TOutputStreamProxy: public io::CopyingOutputStream, public TErrorState { { } - virtual bool Write(const void* buffer, int size); + virtual bool Write(const void* buffer, int size); private: IOutputStream* mSlave; |