diff options
author | Adam Cozzette <acozzette@google.com> | 2017-09-12 10:32:01 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2017-09-14 10:03:57 -0700 |
commit | 13fd045dbb2b4dacea32be162a41d5a4b0d1802f (patch) | |
tree | c219e7eb18b82523e36c6748861c403a14ea66ae /src/google/protobuf/io/zero_copy_stream_impl_lite.cc | |
parent | d1bc27caef8377a710370189675cb0958443e8f1 (diff) | |
download | protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.tar.gz protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.tar.bz2 protobuf-13fd045dbb2b4dacea32be162a41d5a4b0d1802f.zip |
Integrated internal changes from Google
Diffstat (limited to 'src/google/protobuf/io/zero_copy_stream_impl_lite.cc')
-rw-r--r-- | src/google/protobuf/io/zero_copy_stream_impl_lite.cc | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/google/protobuf/io/zero_copy_stream_impl_lite.cc b/src/google/protobuf/io/zero_copy_stream_impl_lite.cc index 60c71c80..66ad49bc 100644 --- a/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +++ b/src/google/protobuf/io/zero_copy_stream_impl_lite.cc @@ -196,27 +196,6 @@ void StringOutputStream::SetString(string* target) { // =================================================================== -LazyStringOutputStream::LazyStringOutputStream( - ResultCallback<string*>* callback) - : StringOutputStream(NULL), - callback_(GOOGLE_CHECK_NOTNULL(callback)), - string_is_set_(false) { -} - -bool LazyStringOutputStream::Next(void** data, int* size) { - if (!string_is_set_) { - SetString(callback_->Run()); - string_is_set_ = true; - } - return StringOutputStream::Next(data, size); -} - -int64 LazyStringOutputStream::ByteCount() const { - return string_is_set_ ? StringOutputStream::ByteCount() : 0; -} - -// =================================================================== - int CopyingInputStream::Skip(int count) { char junk[4096]; int skipped = 0; |