From 5471f18971fd007b39eda185fa076175e49832f9 Mon Sep 17 00:00:00 2001 From: Hong Shin Date: Wed, 11 Dec 2024 08:36:21 -0800 Subject: [PATCH] hpb: collapse Serialize with PtrOrRaw PiperOrigin-RevId: 705119290 --- hpb/hpb.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hpb/hpb.h b/hpb/hpb.h index f3807a197f398..233c97147d82b 100644 --- a/hpb/hpb.h +++ b/hpb/hpb.h @@ -129,15 +129,8 @@ absl::StatusOr Parse(absl::string_view bytes, } template -absl::StatusOr Serialize(const T* message, hpb::Arena& arena, - int options = 0) { - return ::hpb::internal::Serialize(hpb::interop::upb::GetMessage(message), - ::hpb::interop::upb::GetMiniTable(message), - arena.ptr(), options); -} - -template -absl::StatusOr Serialize(Ptr message, hpb::Arena& arena, +absl::StatusOr Serialize(internal::PtrOrRaw message, + hpb::Arena& arena, int options = 0) { return ::hpb::internal::Serialize(hpb::interop::upb::GetMessage(message), ::hpb::interop::upb::GetMiniTable(message),