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

Method Clone

common/values/value_builder.cc:1173–1182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1171 }
1172
1173 CustomMapValue Clone(google::protobuf::Arena* absl_nonnull arena) const override {
1174 ABSL_DCHECK(arena != nullptr);
1175
1176 MapValueBuilderImpl builder(arena);
1177 builder.Reserve(map_.size());
1178 for (const auto& entry : map_) {
1179 builder.UnsafePut(entry.first.Clone(arena), entry.second.Clone(arena));
1180 }
1181 return std::move(builder).BuildCustom();
1182 }
1183
1184 size_t Size() const override { return map_.size(); }
1185

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected