Skip to content

Remove unneeded checking in edge_maker#312

Merged
knoepfel merged 1 commit intoFramework-R-D:mainfrom
greenc-FNAL:maintenance/remove-redundant-checks
Feb 11, 2026
Merged

Remove unneeded checking in edge_maker#312
knoepfel merged 1 commit intoFramework-R-D:mainfrom
greenc-FNAL:maintenance/remove-redundant-checks

Conversation

@greenc-FNAL
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes three unnecessary null pointer checks from the edge_maker implementation. The checks were defensive programming that tested for conditions that cannot occur in C++: null pointers obtained by taking the address of a reference.

Changes:

  • Removed null checks for producer->port and receiver_port in edge_maker::edges()
  • Removed null check for named_port.to_output in edge_maker::operator()
  • Removed null check for port.port in make_provider_edges()

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
phlex/core/edge_maker.hpp Removed two null pointer checks (lines 76-79 and 96-98) that tested pointers obtained from taking addresses of references
phlex/core/edge_maker.cpp Removed one null pointer check (lines 31-34) for a pointer that is always initialized from a reference address

@greenc-FNAL
Copy link
Copy Markdown
Contributor Author

Review the full CodeQL report for details.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
+ Coverage   75.69%   80.49%   +4.79%     
==========================================
  Files         125      125              
  Lines        2946     3066     +120     
  Branches      519      543      +24     
==========================================
+ Hits         2230     2468     +238     
+ Misses        497      377     -120     
- Partials      219      221       +2     
Flag Coverage Δ
unittests 80.49% <ø> (+4.79%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
phlex/core/edge_maker.cpp 77.27% <ø> (ø)
phlex/core/edge_maker.hpp 100.00% <ø> (ø)

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8fef77...efed22c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@knoepfel knoepfel merged commit 1b33dc0 into Framework-R-D:main Feb 11, 2026
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants