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

Method Equal

common/values/duration_value.cc:85–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85absl::Status DurationValue::Equal(
86 const Value& other,
87 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
88 google::protobuf::MessageFactory* absl_nonnull message_factory,
89 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const {
90 ABSL_DCHECK(descriptor_pool != nullptr);
91 ABSL_DCHECK(message_factory != nullptr);
92 ABSL_DCHECK(arena != nullptr);
93 ABSL_DCHECK(result != nullptr);
94
95 if (auto other_value = other.AsDuration(); other_value.has_value()) {
96 *result = BoolValue{NativeValue() == other_value->NativeValue()};
97 return absl::OkStatus();
98 }
99 *result = FalseValue();
100 return absl::OkStatus();
101}
102
103} // namespace cel

Callers

nothing calls this directly

Calls 5

FalseValueFunction · 0.85
NativeValueFunction · 0.70
AsDurationMethod · 0.45
has_valueMethod · 0.45
NativeValueMethod · 0.45

Tested by

no test coverage detected