Remove unneeded checking in edge_maker#312
Conversation
There was a problem hiding this comment.
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->portandreceiver_portinedge_maker::edges() - Removed null check for
named_port.to_outputinedge_maker::operator() - Removed null check for
port.portinmake_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 |
|
Review the full CodeQL report for details. |
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
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
No description provided.