From a090a7abf62392a094a99c3fcc1d0cd35b4f4672 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Fri, 19 Aug 2011 19:16:10 -0700 Subject: Fix proto2 benchmark for newer proto2. --- benchmarks/parsetoproto2.upb.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'benchmarks/parsetoproto2.upb.cc') diff --git a/benchmarks/parsetoproto2.upb.cc b/benchmarks/parsetoproto2.upb.cc index e60c5d5..af3e1f2 100644 --- a/benchmarks/parsetoproto2.upb.cc +++ b/benchmarks/parsetoproto2.upb.cc @@ -86,6 +86,9 @@ class UpbRepeatedPtrField : public google::protobuf::internal::RepeatedPtrFieldB class TypeHandler { public: typedef void Type; + // AddAllocated() calls this, but only if other objects are sitting + // around waiting for reuse, which we will not do. + static void Delete(Type*) { assert(false); } }; void *Add(google::protobuf::Message *m) { void *submsg = RepeatedPtrFieldBase::AddFromCleared(); -- cgit v1.2.3