Skip to content

Commit

Permalink
chore: change to explicit check
Browse files Browse the repository at this point in the history
Signed-off-by: vividf <[email protected]>
  • Loading branch information
vividf committed Jan 14, 2025
1 parent ccd5aab commit 137766f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ std::optional<std::shared_ptr<CloudCollector>> NaiveMatchingStrategy::match_clou
}
}

return closest_collector;
if (closest_collector != nullptr) {
return closest_collector;
}
return std::nullopt;

Check warning on line 57 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/collector_matching_strategy.cpp

View check run for this annotation

Codecov / codecov/patch

sensing/autoware_pointcloud_preprocessor/src/concatenate_data/collector_matching_strategy.cpp#L57

Added line #L57 was not covered by tests
}

Check warning on line 58 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/collector_matching_strategy.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Deep, Nested Complexity

NaiveMatchingStrategy::match_cloud_to_collector has a nested complexity depth of 4, threshold = 4. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.

void NaiveMatchingStrategy::set_collector_info(

Check warning on line 60 in sensing/autoware_pointcloud_preprocessor/src/concatenate_data/collector_matching_strategy.cpp

View check run for this annotation

Codecov / codecov/patch

sensing/autoware_pointcloud_preprocessor/src/concatenate_data/collector_matching_strategy.cpp#L60

Added line #L60 was not covered by tests
Expand Down

0 comments on commit 137766f

Please sign in to comment.