diff --git a/MQ/source/CbmMQTsaMultiSampler.cxx b/MQ/source/CbmMQTsaMultiSampler.cxx index e1d0440a38f5526cc40b1b1c329ed5353c810c81..ff968c8b73b034427e508d1c81968bbc1bfd9172 100644 --- a/MQ/source/CbmMQTsaMultiSampler.cxx +++ b/MQ/source/CbmMQTsaMultiSampler.cxx @@ -230,7 +230,7 @@ void CbmMQTsaMultiSampler::InitTask() try { } else { // Create a ";" separated string with all file names std::string fileList {""}; - for (const auto obj : fInputFileList) { + for (const auto& obj : fInputFileList) { std::string fileName = obj; fileList += fileName; fileList += ";"; diff --git a/MQ/source/CbmMQTsaMultiSamplerTof.cxx b/MQ/source/CbmMQTsaMultiSamplerTof.cxx index c9ade75215b892a2fd7ec120af932474799246ce..82de7085e042aa76641373eb0a72d9b39f2b095b 100644 --- a/MQ/source/CbmMQTsaMultiSamplerTof.cxx +++ b/MQ/source/CbmMQTsaMultiSamplerTof.cxx @@ -151,7 +151,7 @@ void CbmMQTsaMultiSamplerTof::InitTask() try { } else { // Create a ";" separated string with all file names std::string fileList {""}; - for (const auto obj : fInputFileList) { + for (const auto& obj : fInputFileList) { std::string fileName = obj; fileList += fileName; fileList += ";"; diff --git a/sim/transport/geosetup/CbmGeoSetupRepoProvider.cxx b/sim/transport/geosetup/CbmGeoSetupRepoProvider.cxx index 405e017f7f7a4d043435f659a050e2202facc8fe..d1f8093d996c441fde15e1cef596342151032fd1 100644 --- a/sim/transport/geosetup/CbmGeoSetupRepoProvider.cxx +++ b/sim/transport/geosetup/CbmGeoSetupRepoProvider.cxx @@ -78,7 +78,7 @@ namespace { //anonymous namespace with helpers std::regex setupRegex(searchPattern); std::smatch match; std::vector<std::string> result; - for (const auto& file : *fileList) { + for (const auto&& file : *fileList) { std::string fileName = file->GetName(); if (std::regex_search(fileName, match, setupRegex)) diff --git a/tutorials/TaskToAlgo/CbmStsHitProducerIdealWrapper.cxx b/tutorials/TaskToAlgo/CbmStsHitProducerIdealWrapper.cxx index 81a4024172158e8b2f0d3939b7a15f8f1d27ee9b..253c565e1f6fb041710ad43b395494fff3601292 100644 --- a/tutorials/TaskToAlgo/CbmStsHitProducerIdealWrapper.cxx +++ b/tutorials/TaskToAlgo/CbmStsHitProducerIdealWrapper.cxx @@ -124,7 +124,7 @@ void CbmStsHitProducerIdealWrapper::Exec(Option_t* /*opt*/) { // Fill the content of vector into TCA int iPoint = 0; - for (auto const hit : hits) { + for (const auto& hit : hits) { new ((*fHitArray)[iPoint]) CbmStsHit(hit); iPoint++; } diff --git a/tutorials/TaskToAlgo/CbmStsHitProducerTaskIdeal.cxx b/tutorials/TaskToAlgo/CbmStsHitProducerTaskIdeal.cxx index 272244b6dcf9184dc7ea2b03198db6dd08bdc4ef..4ab43349091a01a550150ca5ee8bb27ac1597295 100644 --- a/tutorials/TaskToAlgo/CbmStsHitProducerTaskIdeal.cxx +++ b/tutorials/TaskToAlgo/CbmStsHitProducerTaskIdeal.cxx @@ -148,7 +148,7 @@ void CbmStsHitProducerTaskIdeal::Exec(Option_t* /*opt*/) { // Fill the content of vector into TCA int iPoint = 0; - for (auto const hit : hits) { + for (const auto& hit : hits) { new ((*fHitArray)[iPoint]) CbmStsHit(hit); iPoint++; }