-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix!: Make BinUtility constructor explicit #3953
base: main
Are you sure you want to change the base?
fix!: Make BinUtility constructor explicit #3953
Conversation
WalkthroughModify the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Tests/UnitTests/Examples/Algorithms/Digitization/ModuleClustersTests.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
Plugins/Detray/src/DetrayMaterialConverter.cpp (3)
Line range hint
165-166
: Throw the exception, you must.At line 166, an exception you construct, but throw it you do not. Missing the
throw
keyword, it is.Apply this diff to fix the issue:
- std::invalid_argument("Unsupported binning for Detray"); + throw std::invalid_argument("Unsupported binning for Detray");
Line range hint
172-174
: Exception not thrown, issue this is.An exception object you create at line 173, but throw it you must.
Apply this diff to fix the issue:
- std::runtime_error( - "DetrayMaterialConverter: Unsupported binning for Detray"); + throw std::runtime_error( + "DetrayMaterialConverter: Unsupported binning for Detray");
Line range hint
219-220
: Consider consistency in exception handling, you should.Properly throwing exceptions in all cases, ensure you must.
Review exception handling throughout the code, and consistent use of
throw
confirm.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
Plugins/Detray/src/DetrayMaterialConverter.cpp
(1 hunks)
🔇 Additional comments (1)
Plugins/Detray/src/DetrayMaterialConverter.cpp (1)
177-177
: Adapting to explicit constructor, correctly you have.
The explicit construction of BinUtility
with {}
ensures compatibility and clarity.
Quality Gate passedIssues Measures |
Summary by CodeRabbit
New Features
BinUtility
to prevent implicit conversions.Bug Fixes
Tests
BinUtility
initialization to improve clarity without altering functionality.