Skip to content

Commit 89c75df

Browse files
committed
Fix: fix linter warning
1 parent adb5bd7 commit 89c75df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

PWGCF/Femto/Core/trackHistManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ class TrackHistManager
863863
const auto first = desc.find(';');
864864
const auto second = (first == std::string::npos) ? std::string::npos : desc.find(';', first + 1);
865865
if (second != std::string::npos) {
866-
desc = desc.substr(0, first + 1) + " " + modes::momentumTypeToAxisTitle(mMomentumType) + " " + desc.substr(second);
866+
desc.replace(first + 1, second - first - 1, " " + std::string(modes::momentumTypeToAxisTitle(mMomentumType)) + " ");
867867
}
868868
mHistogramRegistry->add(pidDir + getHistNameV2(hist, HistTable), desc.c_str(), getHistType(hist, HistTable), {Specs.at(hist)});
869869
}

0 commit comments

Comments
 (0)