diff options
-rw-r--r-- | upb/pb/decoder.h | 1 | ||||
-rw-r--r-- | upb/sink.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/upb/pb/decoder.h b/upb/pb/decoder.h index 86e51df..709db49 100644 --- a/upb/pb/decoder.h +++ b/upb/pb/decoder.h @@ -117,6 +117,7 @@ void upb_pbdecoder_reset(upb_pbdecoder *d); * decoded data to its output sink. */ class upb::pb::DecoderPtr { public: + DecoderPtr() : ptr_(nullptr) {} DecoderPtr(upb_pbdecoder* ptr) : ptr_(ptr) {} upb_pbdecoder* ptr() { return ptr_; } @@ -503,7 +503,7 @@ bool upb_bufsrc_putbuf(const char *buf, size_t len, upb_bytessink sink); namespace upb { template <class T> bool PutBuffer(const T& str, BytesSink sink) { - return upb_bufsrc_putbuf(str.c_str(), str.size(), sink.sink()); + return upb_bufsrc_putbuf(str.data(), str.size(), sink.sink()); } } |