Skip to content

Conversation

@alcaliva
Copy link
Collaborator

@github-actions
Copy link

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

@alcaliva alcaliva enabled auto-merge (squash) June 14, 2025 06:28
@vkucera
Copy link
Collaborator

vkucera commented Jun 14, 2025

Thanks @alcaliva !
@hahassan7 FYI

@vkucera vkucera changed the title [PWGJE] Fix: make doRhoAreaSub take const reference to avoid unnecesary copy [PWGJE] Fix: make doRhoAreaSub take jet by const reference Jun 14, 2025
@nzardosh
Copy link
Collaborator

Just for my education, since these are already passed as reference with "&" why would they be copied? I thought "const" only made sure they were not modified

@alcaliva
Copy link
Collaborator Author

Hi @nzardosh,

It is the o2-linter who complains when one loops over jets using non-const reference. I think it is just "good practise" because if the function does not need to modify jet, passing it as a non-const reference might be dangerous, as one might unintentionally alter the original object.

@vkucera
Copy link
Collaborator

vkucera commented Jun 17, 2025

@nzardosh It's not about a copy, it's about the const which absolutely must be there to avoid a copy in a safe way.

@alcaliva alcaliva merged commit ca87480 into AliceO2Group:master Jun 17, 2025
13 of 15 checks passed
jinhyunni pushed a commit to jinhyunni/O2Physics that referenced this pull request Jun 18, 2025
prottayCMT pushed a commit to prottayCMT/O2Physics2024 that referenced this pull request Jun 20, 2025
jpxrk pushed a commit to jpxrk/O2Physics that referenced this pull request Jul 16, 2025
jloemker pushed a commit to jloemker/O2Physics that referenced this pull request Nov 11, 2025
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.

3 participants