Skip to content

Commit 51faf9f

Browse files
CEL Dev Teamcopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 934123553
1 parent 95e4b10 commit 51faf9f

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

extensions/select_optimization.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ std::optional<SelectInstruction> GetSelectInstruction(
158158
absl::string_view field_name) {
159159
auto field_or = planner_context.type_reflector()
160160
.FindStructTypeFieldByName(runtime_type, field_name)
161-
.value_or(absl::nullopt);
161+
.value_or(std::nullopt);
162162
if (field_or.has_value()) {
163163
return SelectInstruction{field_or->number(), std::string(field_or->name())};
164164
}
165-
return absl::nullopt;
165+
return std::nullopt;
166166
}
167167

168168
absl::StatusOr<SelectQualifier> SelectQualifierFromList(const ListExpr& list) {
@@ -410,7 +410,7 @@ class RewriterImpl : public AstRewriterBase {
410410
std::optional<Type> rt_type =
411411
(checker_type.has_message_type())
412412
? GetRuntimeType(checker_type.message_type().type())
413-
: absl::nullopt;
413+
: std::nullopt;
414414
if (rt_type.has_value() && (*rt_type).Is<StructType>()) {
415415
const StructType& runtime_type = rt_type->GetStruct();
416416
std::optional<SelectInstruction> field_or =
@@ -540,7 +540,7 @@ class RewriterImpl : public AstRewriterBase {
540540

541541
std::optional<Type> GetRuntimeType(absl::string_view type_name) {
542542
return planner_context_.type_reflector().FindType(type_name).value_or(
543-
absl::nullopt);
543+
std::nullopt);
544544
}
545545

546546
void SetProgressStatus(const absl::Status& status) {
@@ -600,7 +600,7 @@ class OptimizedSelectImpl {
600600
absl::StatusOr<std::optional<Value>> CheckForMarkedAttributes(
601601
ExecutionFrameBase& frame, const AttributeTrail& attribute_trail) {
602602
if (attribute_trail.empty()) {
603-
return absl::nullopt;
603+
return std::nullopt;
604604
}
605605

606606
if (frame.unknown_processing_enabled() &&
@@ -624,7 +624,7 @@ absl::StatusOr<std::optional<Value>> CheckForMarkedAttributes(
624624
attribute_trail.attribute());
625625
}
626626

627-
return absl::nullopt;
627+
return std::nullopt;
628628
}
629629

630630
absl::StatusOr<Value> OptimizedSelectImpl::ApplySelect(

extensions/select_optimization_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ class MockAccessApis : public LegacyTypeInfoApis, public LegacyTypeAccessApis {
257257
std::optional<
258258
google::api::expr::runtime::LegacyTypeInfoApis::FieldDescription>
259259
FindFieldByName(absl::string_view field_name) const override {
260-
return absl::nullopt;
260+
return std::nullopt;
261261
}
262262

263263
MOCK_METHOD(absl::StatusOr<CelValue>, GetField,

0 commit comments

Comments
 (0)