From ce9bba3cb5409844f8f3d7dcc235a9ea30cad090 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 20 Dec 2013 17:40:40 -0800 Subject: Sync from Google-internal development. --- upb/google/proto1.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'upb/google/proto1.cc') diff --git a/upb/google/proto1.cc b/upb/google/proto1.cc index 51b221a..80a44d8 100644 --- a/upb/google/proto1.cc +++ b/upb/google/proto1.cc @@ -18,6 +18,8 @@ #include "upb/google/proto1.h" +#include + #include "net/proto2/public/repeated_field.h" #include "net/proto/internal_layout.h" #include "net/proto/proto2_reflection.h" @@ -226,10 +228,9 @@ class P2R_Handlers { } template - static bool Append(proto2::RepeatedField* r, T val) { + static void Append(proto2::RepeatedField* r, T val) { // Proto1's ProtoArray class derives from proto2::RepeatedField. r->Add(val); - return true; } // String //////////////////////////////////////////////////////////////////// @@ -316,9 +317,8 @@ class P2R_Handlers { return field; } - static size_t OnCordBuf(Cord* c, const char* buf, size_t n) { + static void OnCordBuf(Cord* c, const char* buf, size_t n) { c->Append(StringPiece(buf, n)); - return true; } static Cord* StartRepeatedCord(proto2::RepeatedField* r, @@ -370,7 +370,7 @@ class P2R_Handlers { const proto2::Message& m, const _pi::Proto2Reflection* r, const upb::FieldDef* f, upb::Handlers* h) { - scoped_ptr data( + std::unique_ptr data( new SubMessageHandlerData(m, proto2_f, r)); if (f->IsSequence()) { SetStartSequenceHandler(proto2_f, r, f, h); @@ -385,7 +385,7 @@ class P2R_Handlers { const proto2::Message& m, const _pi::Proto2Reflection* r, const upb::FieldDef* f, upb::Handlers* h) { - scoped_ptr data( + std::unique_ptr data( new SubMessageHandlerData(m, proto2_f, r)); if (f->IsSequence()) { SetStartSequenceHandler(proto2_f, r, f, h); -- cgit v1.2.3