-
Notifications
You must be signed in to change notification settings - Fork 172
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
refactor: brace-enclosed initializers for pair/tuple returns #3931
Conversation
WalkthroughMany changes made, focus they do on simplifying return statements across various classes and methods. Replaced Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
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 (
|
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 (1)
Examples/Framework/src/EventData/ScalingCalibrator.cpp (1)
55-57
: Strong with the Force, this error handling is! Hmmmm.Fail fast, your code now does. Wisdom in checking validity before proceeding, there is. Clear and early error messages, the path to maintainable code are.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (40)
Core/include/Acts/EventData/MultiComponentTrackParameters.hpp
(1 hunks)Core/include/Acts/Seeding/BinnedGroupIterator.ipp
(1 hunks)Core/include/Acts/Seeding/SeedFinder.ipp
(2 hunks)Core/include/Acts/TrackFitting/detail/KalmanGlobalCovariance.hpp
(1 hunks)Core/include/Acts/Utilities/GridBinFinder.ipp
(1 hunks)Core/include/Acts/Utilities/TrackHelpers.hpp
(6 hunks)Core/src/Propagator/detail/CovarianceEngine.cpp
(1 hunks)Core/src/Propagator/detail/SympyCovarianceEngine.cpp
(1 hunks)Core/src/Surfaces/detail/AlignmentHelper.cpp
(1 hunks)Core/src/Surfaces/detail/AnnulusBoundsHelper.cpp
(1 hunks)Core/src/Utilities/SpacePointUtility.cpp
(1 hunks)Core/src/Vertexing/AdaptiveGridTrackDensity.cpp
(1 hunks)Core/src/Vertexing/ImpactPointEstimator.cpp
(2 hunks)Core/src/Vertexing/Vertex.cpp
(1 hunks)Examples/Detectors/ContextualDetector/src/AlignedDetector.cpp
(1 hunks)Examples/Detectors/DD4hepDetector/src/DD4hepDetector.cpp
(1 hunks)Examples/Detectors/GenericDetector/src/GenericDetector.cpp
(1 hunks)Examples/Detectors/TGeoDetector/src/TGeoDetector.cpp
(1 hunks)Examples/Detectors/TelescopeDetector/src/TelescopeDetector.cpp
(1 hunks)Examples/Framework/src/EventData/ScalingCalibrator.cpp
(1 hunks)Examples/Framework/src/Utilities/Paths.cpp
(1 hunks)Examples/Io/Root/include/ActsExamples/Io/Root/RootMaterialDecorator.hpp
(1 hunks)Examples/Io/Root/src/RootNuclearInteractionParametersWriter.cpp
(6 hunks)Examples/Io/Root/src/RootTrackStatesWriter.cpp
(1 hunks)Examples/Io/Root/src/detail/NuclearInteractionParametrisation.cpp
(5 hunks)Examples/Scripts/compareRootFiles.hpp
(1 hunks)Fatras/include/ActsFatras/Physics/ElectroMagnetic/PhotonConversion.hpp
(2 hunks)Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteraction.hpp
(3 hunks)Fatras/src/Physics/NuclearInteraction/NuclearInteraction.cpp
(1 hunks)Plugins/DD4hep/src/DD4hepBlueprintFactory.cpp
(2 hunks)Plugins/Geant4/src/Geant4Converters.cpp
(4 hunks)Plugins/GeoModel/src/GeoModelBlueprintCreater.cpp
(3 hunks)Plugins/GeoModel/src/detail/GeoModelExtentHelper.cpp
(2 hunks)Tests/UnitTests/Core/Geometry/LayerCreatorTests.cpp
(1 hunks)Tests/UnitTests/Core/Geometry/SurfaceArrayCreatorTests.cpp
(1 hunks)Tests/UnitTests/Core/SpacePointFormation/SpacePointBuilderTests.cpp
(1 hunks)Tests/UnitTests/Core/Vertexing/VertexingDataHelper.hpp
(1 hunks)Tests/UnitTests/Plugins/Cuda/Seeding/SeedFinderCudaTest.cpp
(1 hunks)Tests/UnitTests/Plugins/Cuda/Seeding2/main.cpp
(1 hunks)Tests/UnitTests/Plugins/Geant4/Geant4SurfaceProviderTests.cpp
(1 hunks)
✅ Files skipped from review due to trivial changes (22)
- Tests/UnitTests/Plugins/Cuda/Seeding2/main.cpp
- Core/include/Acts/TrackFitting/detail/KalmanGlobalCovariance.hpp
- Tests/UnitTests/Core/Vertexing/VertexingDataHelper.hpp
- Examples/Detectors/ContextualDetector/src/AlignedDetector.cpp
- Core/src/Surfaces/detail/AlignmentHelper.cpp
- Tests/UnitTests/Core/Geometry/LayerCreatorTests.cpp
- Tests/UnitTests/Core/SpacePointFormation/SpacePointBuilderTests.cpp
- Core/src/Surfaces/detail/AnnulusBoundsHelper.cpp
- Examples/Detectors/TelescopeDetector/src/TelescopeDetector.cpp
- Core/src/Vertexing/AdaptiveGridTrackDensity.cpp
- Core/src/Utilities/SpacePointUtility.cpp
- Tests/UnitTests/Plugins/Geant4/Geant4SurfaceProviderTests.cpp
- Examples/Io/Root/include/ActsExamples/Io/Root/RootMaterialDecorator.hpp
- Examples/Scripts/compareRootFiles.hpp
- Tests/UnitTests/Plugins/Cuda/Seeding/SeedFinderCudaTest.cpp
- Fatras/include/ActsFatras/Physics/ElectroMagnetic/PhotonConversion.hpp
- Plugins/Geant4/src/Geant4Converters.cpp
- Core/src/Vertexing/Vertex.cpp
- Core/include/Acts/Seeding/SeedFinder.ipp
- Plugins/DD4hep/src/DD4hepBlueprintFactory.cpp
- Core/include/Acts/Seeding/BinnedGroupIterator.ipp
- Fatras/src/Physics/NuclearInteraction/NuclearInteraction.cpp
👮 Files not reviewed due to content moderation or server errors (3)
- Examples/Io/Root/src/RootNuclearInteractionParametersWriter.cpp
- Core/src/Vertexing/ImpactPointEstimator.cpp
- Fatras/include/ActsFatras/Physics/NuclearInteraction/NuclearInteraction.hpp
🔇 Additional comments (20)
Examples/Detectors/GenericDetector/src/GenericDetector.cpp (1)
30-30
: Approve this change, I do!
Simplified the return statement has become, hmm. Cleaner and more modern the code now is, while maintaining the same functionality it does.
Examples/Detectors/DD4hepDetector/src/DD4hepDetector.cpp (1)
45-45
: Wisdom in simplicity, there is!
The Force strong with this change it is. Brace initialization, a more elegant weapon for a more civilized age, it has become.
Core/include/Acts/Utilities/GridBinFinder.ipp (1)
48-50
: Approve these changes too, I must!
Two pairs of braces, like twin suns of Tatooine, they are. Simplified the code has become, while its power remains unchanged, hmm.
Examples/Framework/src/Utilities/Paths.cpp (1)
113-115
: Approve these changes, I do! Hmmmm.
More elegant and modern, the brace initialization is. Simplified the return statements without changing their behavior, you have.
Plugins/GeoModel/src/detail/GeoModelExtentHelper.cpp (1)
160-160
: Wise choice, this change is! Hmmmm.
Maintained the safety of the bounds checking, you have, while embracing the modern ways of the C++ force. Type safety preserved, it remains.
Examples/Framework/src/EventData/ScalingCalibrator.cpp (1)
63-70
: Clean and modern, your return statement has become.
After validation, the GeometryIdentifier construction occurs. Safe and elegant, this approach is. Brace initialization, a path to cleaner code it is.
Core/src/Propagator/detail/SympyCovarianceEngine.cpp (1)
89-89
: Approve this change, I do!
Simplified the return statement has become, hmm. Modern C++ practices this follows, while maintaining the same functionality it does. Efficient the move semantics remain, yes.
Core/src/Propagator/detail/CovarianceEngine.cpp (1)
100-100
: Consistent with the Force, this change is!
Mirror the changes in SympyCovarianceEngine.cpp, this does. Harmony in the codebase, it brings. Move semantics preserved, they are.
Core/include/Acts/EventData/MultiComponentTrackParameters.hpp (1)
132-136
: Clear as the waters of Dagobah, this code has become!
Multi-line formatting, wisdom it shows. Readable the code is, while type safety it maintains. With other changes in the codebase, harmony it creates, hmm.
Examples/Io/Root/src/detail/NuclearInteractionParametrisation.cpp (2)
90-90
: Approve this change, I do!
Simplified the return statement is, yet maintains its functionality it does. More readable and modern, the code becomes.
125-125
: Approve this change as well, I must!
Clear and concise, the return statement becomes. Modern C++ practices, it follows.
Examples/Detectors/TGeoDetector/src/TGeoDetector.cpp (1)
378-378
: Wise this change is, approve it I do!
Moved properly, both elements are. Efficient and clear, the code becomes. Performance maintained, while readability improved is.
Plugins/GeoModel/src/GeoModelBlueprintCreater.cpp (4)
323-323
: Approve this early return, I do!
Simple and clear, the empty return becomes. Proper handling of the null case, it maintains.
396-399
: Approve this builder return, I must!
Well structured the return statement is. Layer structure builder and extent, properly initialized they are.
407-407
: Approve this fallback return, I shall!
Consistent with other returns, this fallback case is. Proper null handling, it maintains.
437-437
: Strong with the Force, this change is!
Clean and readable, the multi-value return becomes. Type safety and initialization, properly maintained they are.
Core/include/Acts/Utilities/TrackHelpers.hpp (2)
212-212
: Approve the modernization of pair construction, I do!
Replaced std::make_pair with brace initialization, you have. Cleaner and more modern the code becomes. Consistent with modern C++ practices, this change is.
Also applies to: 232-232, 259-259, 265-265
533-533
: Hmmmm, consistent in your changes, you are!
In the calculate*Residual functions, the same modernization pattern you follow. Approve of this consistency, I do. More readable the code becomes.
Also applies to: 569-569, 605-605
Tests/UnitTests/Core/Geometry/SurfaceArrayCreatorTests.cpp (1)
231-231
: In the test code too, maintain consistency you do!
In makeBarrelStagger function, the same modernization pattern you apply. Harmony in the codebase, this brings. The Force is strong with this change.
Examples/Io/Root/src/RootTrackStatesWriter.cpp (1)
474-474
: In the lambda function, follow the same path you do!
In getTrackParams lambda, embrace modern syntax you do. Consistent with other changes this is. Approve of this unified approach, I do.
Also applies to: 477-477, 480-480
Quality Gate passedIssues Measures |
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Tests