Skip to content

Clang warnings and clang-tidy removing pessimizing-move and unneeded moves

Clang warnings and clang-tidy removing pessimizing-move and unneeded moves

Fixing warnings

/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx:270:20: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
      parameters = std::move((*itTSoS)
                   ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx:270:20: note: remove std::move call here
      parameters = std::move((*itTSoS)
                   ^~~~~~~~~~
/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx:287:13: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
      rot = std::move((*itTSoS)->measurementOnTrack()->uniqueClone());
            ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkTools/TrkTrackSlimmingTool/src/TrackSlimmingTool.cxx:287:13: note: remove std::move call here
      rot = std::move((*itTSoS)->measurementOnTrack()->uniqueClone());
/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx:1200:21: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
             pars = std::move((*it)->trackParameters()->uniqueClone());
                    ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkTools/TrkMaterialProvider/src/TrkMaterialProviderTool.cxx:1200:21: note: remove std::move call here
             pars = std::move((*it)->trackParameters()->uniqueClone());

Mentioning @ssnyder

Edited by Christos Anastopoulos

Merge request reports