| 1007 | } |
| 1008 | |
| 1009 | CustomMapValue Clone(google::protobuf::Arena* absl_nonnull arena) const override { |
| 1010 | ABSL_DCHECK(arena != nullptr); |
| 1011 | |
| 1012 | MapValueBuilderImpl builder(arena); |
| 1013 | builder.Reserve(map_.size()); |
| 1014 | for (const auto& entry : map_) { |
| 1015 | builder.UnsafePut(entry.first.Clone(arena), entry.second.Clone(arena)); |
| 1016 | } |
| 1017 | return std::move(builder).BuildCustom(); |
| 1018 | } |
| 1019 | |
| 1020 | size_t Size() const override { return map_.size(); } |
| 1021 |