Skip to content

[PWGDQ] Use const& and std::move to avoid copies - #17707

Open
vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:const-PWGDQ
Open

[PWGDQ] Use const& and std::move to avoid copies#17707
vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:const-PWGDQ

Conversation

@vkucera

@vkucera vkucera commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Mostly done automatically by Clang-Tidy.

Mostly done automatically by Clang-Tidy.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 1294 errors, ⚠️ 442 warnings, 🔕 0 disabled

@github-actions github-actions Bot added the pwgdq label Sep 1, 2026
@github-actions github-actions Bot changed the title Use const& and std::move to avoid copies [PWGDQ] Use const& and std::move to avoid copies Sep 1, 2026
@vkucera
vkucera marked this pull request as ready for review September 1, 2026 15:54
@alibuild

alibuild commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 8a33aaf at 2026-09-02 02:07:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 552 errors and 428 warnings.'
Found 552 errors and 428 warnings.
++ [[ 552 -gt 0 ]]
++ cat /sw/BUILD/4d92f404604a2e56052ec0c9a355c4811e701626/O2Physics-code-check/errors.txt
PWGDQ/Core/MCSignal.h:182:11: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
PWGDQ/Macros/dqFlowAccWeights.C:49:10: error: variable 'file' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Macros/dqFlowAccWeights.C:56:15: error: variable 'weights' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:122:8: error: constructor does not initialize these fields: fHistMan, fCCDB, fEventCut, fCurrentRun [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:232:34: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:232:63: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:367:59: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:380:65: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:382:62: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:430:53: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:435:12: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:438:8: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:440:34: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:445:52: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:451:12: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:454:8: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:528:82: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:572:63: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:574:75: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:580:32: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:583:80: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:585:92: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:588:16: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:607:18: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:627:102: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:728:48: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:777:32: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:817:57: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:819:69: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:825:32: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:828:84: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:830:16: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:851:96: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:981:12: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:985:10: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1065:53: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1070:12: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1073:8: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1075:34: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1080:52: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1086:12: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGDQ/TableProducer/tableMakerMC.cxx:1089:8: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

@alibuild

alibuild commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 8a33aaf at 2026-09-02 16:33:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
c++: fatal error: Killed signal terminated program cc1plus
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants