Skip to content

[PWGHF] Use const& and std::move to avoid copies - #17709

Merged
vkucera merged 1 commit into
AliceO2Group:masterfrom
vkucera:const-PWGHF
Sep 2, 2026
Merged

[PWGHF] Use const& and std::move to avoid copies#17709
vkucera merged 1 commit into
AliceO2Group:masterfrom
vkucera:const-PWGHF

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 added the pwghf PWG-HF label Sep 1, 2026
@github-actions github-actions Bot changed the title Use const& and std::move to avoid copies [PWGHF] Use const& and std::move to avoid copies Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 40 errors, ⚠️ 11 warnings, 🔕 12 disabled

@alibuild

alibuild commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for e2adc26 at 2026-09-01 22:27:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 225 errors and 130 warnings.'
Found 225 errors and 130 warnings.
++ [[ 225 -gt 0 ]]
++ cat /sw/BUILD/1676c9f26ff6caea74764bed8cbd1bec49a2da98/O2Physics-code-check/errors.txt
PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx:196:78: 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]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:40:1: error: constructor does not initialize these fields: fSBYield [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:110:1: error: constructor does not initialize these fields: fSBYield [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:110:26: error: calling a base constructor other than the copy constructor [bugprone-copy-constructor-init,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:216:17: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:217:17: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:218:23: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:219:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:220:18: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:221:24: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:223:19: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:224:20: error: variable length arrays in C++ are a Clang extension [clang-diagnostic-vla-cxx-extension,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:226:9: error: variable 'h2DSign' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:227:9: error: variable 'h2DSideb' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:228:9: error: variable 'h2DSubtr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:230:9: error: variable 'h2DFdTemplatePrompt' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:231:9: error: variable 'h2DFdTemplateNonPrompt' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:233:9: error: variable 'h1DSign' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:234:9: error: variable 'h1DSideb' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:235:9: error: variable 'h1DSubtr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:236:9: error: variable 'h1DSignNorm' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:237:9: error: variable 'h1DSidebNorm' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:238:9: error: variable 'h1DSubtrNorm' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:239:9: error: variable 'h1DFdTemplatePrompt' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:240:9: error: variable 'h1DFdTemplateNonPrompt' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:241:9: error: variable 'h1DTemplateTotal' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:242:9: error: variable 'h1DSubtrFdNorm' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:243:9: error: variable 'h1DPrimaryPartCorr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:244:9: error: variable 'h1DAllPartCorr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:245:9: error: variable 'h1DSecPartFrac' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:246:9: error: variable 'h1DSubtrNormSecPart' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:247:9: error: variable 'h1DBaselineSubtr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:248:9: error: variable 'h1DReflCorr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:249:9: error: variable 'h1DReflCorrBaselineSubtr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:250:9: error: variable 'hModul' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:251:9: error: variable 'hBeforeModulCorr' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:253:12: error: variable 'fdPromptFrac' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:328:24: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:332:25: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:377:17: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:378:18: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGHF/HFC/Macros/DhCorrelationExtraction.cxx:428:14: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

@vkucera
vkucera enabled auto-merge (squash) September 2, 2026 07:48

@alibuild alibuild left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approving on behalf of @vkucera.

@vkucera
vkucera merged commit f527840 into AliceO2Group:master Sep 2, 2026
12 of 15 checks passed
@vkucera
vkucera deleted the const-PWGHF branch September 2, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

2 participants