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

Method Clone

common/values/parsed_json_map_value.cc:189–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189ParsedJsonMapValue ParsedJsonMapValue::Clone(
190 google::protobuf::Arena* absl_nonnull arena) const {
191 ABSL_DCHECK(arena != nullptr);
192
193 if (value_ == nullptr) {
194 return ParsedJsonMapValue();
195 }
196 if (arena_ == arena) {
197 return *this;
198 }
199 auto* cloned = value_->New(arena);
200 cloned->CopyFrom(*value_);
201 return ParsedJsonMapValue(cloned, arena);
202}
203
204size_t ParsedJsonMapValue::Size() const {
205 if (value_ == nullptr) {

Callers

nothing calls this directly

Calls 3

CopyFromMethod · 0.80
ParsedJsonMapValueClass · 0.70
NewMethod · 0.45

Tested by

no test coverage detected