| 177 | #undef CEL_TERNARY_OPERATOR |
| 178 | |
| 179 | absl::optional<Operator> Operator::FindByName(absl::string_view input) { |
| 180 | absl::call_once(operators_once_flag, InitializeOperators); |
| 181 | if (input.empty()) { |
| 182 | return absl::nullopt; |
| 183 | } |
| 184 | auto it = |
| 185 | std::lower_bound(operators_by_name.cbegin(), operators_by_name.cend(), |
| 186 | input, OperatorDataNameComparer{}); |
| 187 | if (it == operators_by_name.cend() || (*it)->name != input) { |
| 188 | return absl::nullopt; |
| 189 | } |
| 190 | return Operator(*it); |
| 191 | } |
| 192 | |
| 193 | absl::optional<Operator> Operator::FindByDisplayName(absl::string_view input) { |
| 194 | absl::call_once(operators_once_flag, InitializeOperators); |
nothing calls this directly
no test coverage detected