| 772 | } |
| 773 | |
| 774 | google::protobuf::Message* DoubleFromValue(const google::protobuf::Message* prototype, |
| 775 | const CelValue& value, google::protobuf::Arena* arena) { |
| 776 | double val; |
| 777 | if (!value.GetValue(&val)) { |
| 778 | return nullptr; |
| 779 | } |
| 780 | auto* message = prototype->New(arena); |
| 781 | CEL_ASSIGN_OR_RETURN( |
| 782 | auto reflection, |
| 783 | cel::well_known_types::GetDoubleValueReflection(message->GetDescriptor()), |
| 784 | _.With(IgnoreErrorAndReturnNullptr())); |
| 785 | reflection.SetValue(message, val); |
| 786 | return message; |
| 787 | } |
| 788 | |
| 789 | google::protobuf::Message* FloatFromValue(const google::protobuf::Message* prototype, |
| 790 | const CelValue& value, google::protobuf::Arena* arena) { |
no test coverage detected