MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / Clone

Method Clone

common/values/value_builder.cc:1009–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

CloneMethod · 0.45
CloneMethod · 0.45
CloneMethod · 0.45

Calls 4

UnsafePutMethod · 0.80
BuildCustomMethod · 0.80
ReserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected