Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions cc/google/fhir/fhir_path/fhir_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2810,7 +2810,7 @@ class MemberOfFunction : public SingleValueFunctionNode {
if (system_field == nullptr) {
system_field = coding.GetDescriptor()->FindFieldByName("system");
}
absl::optional<std::string> system = absl::nullopt;
absl::optional<std::string> system = std::nullopt;
if (system_field != nullptr &&
coding.GetReflection()->HasField(coding, system_field)) {
FHIR_ASSIGN_OR_RETURN(
Expand Down Expand Up @@ -2851,7 +2851,7 @@ class MemberOfFunction : public SingleValueFunctionNode {
} else if (IsCode(*element.Message())) {
FHIR_ASSIGN_OR_RETURN(
bool is_member,
CodeIsMember(*element.Message(), /*code_system=*/absl::nullopt,
CodeIsMember(*element.Message(), /*code_system=*/std::nullopt,
value_set_id, work_space));
membership_results.push_back(is_member);
} else if (IsString(*element.Message())) {
Expand Down Expand Up @@ -3063,13 +3063,13 @@ class ComparisonOperator : public BinaryOperator {
int32_t right) const {
switch (comparison_type_) {
case kLessThan:
return absl::make_optional(left < right);
return std::make_optional(left < right);
case kGreaterThan:
return absl::make_optional(left > right);
return std::make_optional(left > right);
case kLessThanEqualTo:
return absl::make_optional(left <= right);
return std::make_optional(left <= right);
case kGreaterThanEqualTo:
return absl::make_optional(left >= right);
return std::make_optional(left >= right);
}
}

Expand All @@ -3087,20 +3087,20 @@ class ComparisonOperator : public BinaryOperator {

switch (comparison_type_) {
case kLessThan:
return absl::make_optional(left < right);
return std::make_optional(left < right);
case kGreaterThan:
return absl::make_optional(left > right);
return std::make_optional(left > right);
case kLessThanEqualTo:
// Fallback to literal comparison for equality to avoid
// rounding errors.
return absl::make_optional(
return std::make_optional(
left <= right ||
(left_message->GetDescriptor() == right_message->GetDescriptor() &&
MessageDifferencer::Equals(*left_message, *right_message)));
case kGreaterThanEqualTo:
// Fallback to literal comparison for equality to avoid
// rounding errors.
return absl::make_optional(
return std::make_optional(
left >= right ||
(left_message->GetDescriptor() == right_message->GetDescriptor() &&
MessageDifferencer::Equals(*left_message, *right_message)));
Expand Down Expand Up @@ -3131,13 +3131,13 @@ class ComparisonOperator : public BinaryOperator {

switch (comparison_type_) {
case kLessThan:
return absl::make_optional(compare_result < 0);
return std::make_optional(compare_result < 0);
case kGreaterThan:
return absl::make_optional(compare_result > 0);
return std::make_optional(compare_result > 0);
case kLessThanEqualTo:
return absl::make_optional(compare_result <= 0);
return std::make_optional(compare_result <= 0);
case kGreaterThanEqualTo:
return absl::make_optional(compare_result >= 0);
return std::make_optional(compare_result >= 0);
}
}

Expand Down Expand Up @@ -3201,13 +3201,13 @@ class ComparisonOperator : public BinaryOperator {

switch (comparison_type_) {
case kLessThan:
return absl::make_optional(time_difference < 0);
return std::make_optional(time_difference < 0);
case kGreaterThan:
return absl::make_optional(time_difference > 0);
return std::make_optional(time_difference > 0);
case kLessThanEqualTo:
return absl::make_optional(time_difference <= 0);
return std::make_optional(time_difference <= 0);
case kGreaterThanEqualTo:
return absl::make_optional(time_difference >= 0);
return std::make_optional(time_difference >= 0);
}
}

Expand Down