Skip to content

HLTSeeding Fix clang warning [-Wrange-loop-construct]

Fix clang warning on 'const std::shared_ptrTrigConf::L1Threshold' creates a copy from type 'const std::shared_ptrTrigConf::L1Threshold' [-Wrange-loop-construct]

/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/EMRoIsUnpackingTool.cxx:68:23: warning: loop variable 'th' of type 'const std::shared_ptr<TrigConf::L1Threshold>' creates a copy from type 'const std::shared_ptr<TrigConf::L1Threshold>' [-Wrange-loop-construct]
      for (const auto th : emThresholds.value().get()) {
                      ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/EMRoIsUnpackingTool.cxx:68:12: note: use reference type 'const std::shared_ptr<TrigConf::L1Threshold> &' to prevent copying
      for (const auto th : emThresholds.value().get()) {
           ^~~~~~~~~~~~~~~
                      &
/src/HLTSeeding.cxx.o.d -o CMakeFiles/HLTSeeding.dir/src/HLTSeeding.cxx.o -c /build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/HLTSeeding.cxx
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/JRoIsUnpackingTool.cxx:70:23: warning: loop variable 'th' of type 'const std::shared_ptr<TrigConf::L1Threshold>' creates a copy from type 'const std::shared_ptr<TrigConf::L1Threshold>' [-Wrange-loop-construct]
      for (const auto th : jetThresholds.value().get()) {
                      ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/JRoIsUnpackingTool.cxx:70:12: note: use reference type 'const std::shared_ptr<TrigConf::L1Threshold> &' to prevent copying
      for (const auto th : jetThresholds.value().get()) {
           ^~~~~~~~~~~~~~~
                      &
/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/METRoIsUnpackingTool.cxx
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/MURoIsUnpackingTool.cxx:75:21: warning: loop variable 'th' of type 'const std::shared_ptr<TrigConf::L1Threshold>' creates a copy from type 'const std::shared_ptr<TrigConf::L1Threshold>' [-Wrange-loop-construct]
    for (const auto th : muThresholds.value().get()) {
                    ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/MURoIsUnpackingTool.cxx:75:10: note: use reference type 'const std::shared_ptr<TrigConf::L1Threshold> &' to prevent copying
    for (const auto th : muThresholds.value().get()) {
         ^~~~~~~~~~~~~~~
                    &
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/MURoIsUnpackingTool.cxx:151:21: warning: loop variable 'thr' of type 'const std::shared_ptr<TrigConf::L1Threshold>' creates a copy from type 'const std::shared_ptr<TrigConf::L1Threshold>' [-Wrange-loop-construct]
    for (const auto thr : muThresholds.value().get()) {
                    ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/MURoIsUnpackingTool.cxx:151:10: note: use reference type 'const std::shared_ptr<TrigConf::L1Threshold> &' to prevent copying
    for (const auto thr : muThresholds.value().get()) {
         ^~~~~~~~~~~~~~~~
                    &
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/METRoIsUnpackingTool.cxx:62:19: warning: loop variable 'th' of type 'const std::shared_ptr<TrigConf::L1Threshold>' creates a copy from type 'const std::shared_ptr<TrigConf::L1Threshold>' [-Wrange-loop-construct]
  for (const auto th: thresholds) {
                  ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/METRoIsUnpackingTool.cxx:62:8: note: use reference type 'const std::shared_ptr<TrigConf::L1Threshold> &' to prevent copying
  for (const auto th: thresholds) {
       ^~~~~~~~~~~~~~
                  &

/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.cxx:78:23: warning: loop variable 'th' of type 'const std::shared_ptr<TrigConf::L1Threshold>' creates a copy from type 'const std::shared_ptr<TrigConf::L1Threshold>' [-Wrange-loop-construct]
      for (const auto th : tauThresholds.value().get()) {
                      ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/HLTSeeding/src/TAURoIsUnpackingTool.cxx:78:12: note: use reference type 'const std::shared_ptr<TrigConf::L1Threshold> &' to prevent copying
      for (const auto th : tauThresholds.value().get()) {
           ^~~~~~~~~~~~~~~
                      &

see http://atlas-computing.web.cern.ch/atlas-computing/links/distDirectory/gitwww/MASTERWebArea/ardoc_web_areamaster64BC7C10AthenaOpt/ARDOC_Log_2021-08-14T2130/Trigger_TrigSteer_HLTSeeding.html

Mentiong @rbielski and @ssnyder

Merge request reports

Loading