Skip to content

Commit

Permalink
perf: Avoid creation of unused string in CKF (#3090)
Browse files Browse the repository at this point in the history
refactor:  avoid creation of unused strings.

Currently a string used for verbose logs is created always, which can be avoided.
  • Loading branch information
goetzgaycken authored Apr 9, 2024
1 parent e22fef9 commit 2bdcb77
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Core/include/Acts/TrackFinding/CombinatorialKalmanFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ class CombinatorialKalmanFilter {
// The surface could be either sensitive or passive
bool isSensitive = (surface->associatedDetectorElement() != nullptr);
bool isMaterial = (surface->surfaceMaterial() != nullptr);
std::string type = isSensitive ? "sensitive" : "passive";
ACTS_VERBOSE("Detected " << type
ACTS_VERBOSE("Detected " << (isSensitive ? "sensitive" : "passive")
<< " surface: " << surface->geometryId());
if (isSensitive) {
// Increment of number of passed sensitive surfaces
Expand Down

0 comments on commit 2bdcb77

Please sign in to comment.