summaryrefslogtreecommitdiff
path: root/upb
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2019-01-25 15:03:22 -0800
committerJosh Haberman <jhaberman@gmail.com>2019-01-25 15:03:22 -0800
commitc4327e55ac186383f909d52ddd363971a2c60562 (patch)
tree83ca16eb92e3005f868aed034c7304c337bbc94f /upb
parent8980f6db5c4d28de9dd8773ae27c823767122970 (diff)
A few more fixes.
Diffstat (limited to 'upb')
-rw-r--r--upb/pb/decoder.h1
-rw-r--r--upb/sink.h2
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_; }
diff --git a/upb/sink.h b/upb/sink.h
index e41feae..4d6d0a3 100644
--- a/upb/sink.h
+++ b/upb/sink.h
@@ -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());
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback