fix: push_back to emplace_back done by AI#5314
Open
asalzburger wants to merge 3 commits intoacts-project:mainfrom
Open
fix: push_back to emplace_back done by AI#5314asalzburger wants to merge 3 commits intoacts-project:mainfrom
asalzburger wants to merge 3 commits intoacts-project:mainfrom
Conversation
andiwand
reviewed
Apr 3, 2026
Contributor
asalzburger
commented
Apr 4, 2026
Contributor
Author
asalzburger
left a comment
There was a problem hiding this comment.
Adressing PR comments - by passing arguments directly.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



PR Summary: Implicit conversion/narrowing +
push_back→emplace_back*** This was done using Cursor on top of our SonarCloud report ***
Summary
This PR applies mechanical numeric-conversion cleanups and container insertion improvements to address SonarCloud findings around implicit conversion / narrowing and
push_backvsemplace_back. No algorithms were intended to change; changes are focused on making conversions explicit and matching the most appropriate container API.What changed
Implicit conversion / narrowing fixes
static_castat conversion boundaries (index-size types, arithmetic promotions, anddouble→floatassignments).fsuffixes / explicit float literals where configuration fields arefloat.static_cast<int>(idx)before adding signed offsets).push_back→emplace_backpush_backwithemplace_backin the Sonar-flagged call sites (and adjusted braced initialization where needed to keep the code compiling).emplace_back(...)argument form.tapVec.push_back(std::make_pair(...))totapVec.emplace_back(..., ...)inCuboidVolumeBuilder.cpp.Files (high level)
Core,ActsAlignment, utilities, and geometry builders.push_back→emplace_back(explicitly fixed in the last pass):Core/include/Acts/Utilities/Table.hppCore/src/EventData/CorrectedTransformationFreeToBound.cppCore/src/Geometry/{Cone,Cuboid,Cylinder,Diamond}VolumeBounds.cppCore/src/Geometry/GenericCuboidVolumeBounds.cppCore/src/Geometry/CuboidVolumeBuilder.cppCore/src/Geometry/LayerArrayCreator.cppVerification
ActsCore(and earlierActsAlignment) with warnings enabled for float conversion.ActsUnitTestConeVolumeBoundsActsUnitTestCuboidVolumeBoundsActsUnitTestCylinderVolumeBoundsActsUnitTestDiamondVolumeBoundsActsUnitTestGenericCuboidVolumeBoundsActsUnitTestCorrectedTransformFreeToBoundActsUnitTestTableActsUnitTestCuboidVolumeBuilderActsUnitTestLayerCreatorSonarCloud export bookkeeping (local JSON)
sc_issues.jsonexport:implicit_conversion_narrowing_resolved_count = 184push_back_emplace_back_resolved_count = 40/Users/salzburg/Documents/work/installed/acts-sonarcloud/sonarcloud/sc_issues.json--- END COMMIT MESSAGE ---
Any further description goes here, @-mentions are ok here!
feat,fix,refactor,docs,choreandbuildtypes.