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

Function MakeCompatListValue

common/values/value_builder.cc:508–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506namespace {} // namespace
507
508absl::StatusOr<const CompatListValue* absl_nonnull> MakeCompatListValue(
509 const CustomListValue& value,
510 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
511 google::protobuf::MessageFactory* absl_nonnull message_factory,
512 google::protobuf::Arena* absl_nonnull arena) {
513 ListValueBuilderImpl builder(arena);
514 builder.Reserve(value.Size());
515
516 CEL_RETURN_IF_ERROR(value.ForEach(
517 [&](const Value& element) -> absl::StatusOr<bool> {
518 CEL_RETURN_IF_ERROR(builder.Add(element));
519 return true;
520 },
521 descriptor_pool, message_factory, arena));
522
523 return std::move(builder).BuildCompat();
524}
525
526MutableListValue* absl_nonnull NewMutableListValue(
527 google::protobuf::Arena* absl_nonnull arena) {

Callers 1

LegacyTrivialListValueFunction · 0.85

Calls 5

BuildCompatMethod · 0.80
ReserveMethod · 0.45
SizeMethod · 0.45
ForEachMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected