Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove unnessary reference to suppress warning #8337

Merged
merged 1 commit into from Dec 15, 2020
Merged

Fix: Remove unnessary reference to suppress warning #8337

merged 1 commit into from Dec 15, 2020

Conversation

@bc-lee
Copy link
Contributor

@bc-lee bc-lee commented Nov 7, 2020

Apple Clang version 12 (bundled with Xcode 12) complaints about copying
small objects in range loop (-Wrange-loop-analysis introduced by -Wall).
This warning can be easily avoided by removing the reference from
the const pointer type.

@LordAro
Copy link
Member

@LordAro LordAro commented Dec 2, 2020

To be honest, I feel like removing the reference is the better solution here. Taking a reference of a const pointer is fairly ...pointless

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 14, 2020

@bc-lee : would you feel up for this? Instead of suppressing the warning, fixing the cause? Would be really awesome if you can fix it :) It is annoying the hell out of me on every CI run :P

Apple Clang version 12 (bundled with Xcode 12) complaints about copying
small objects in range loop (-Wrange-loop-analysis introduced by -Wall).
This warning can be easily avoided by removing the reference from
the const pointer type.
@bc-lee bc-lee changed the title Fix: Suppress unnecessary warnings introduced in Xcode 12 Fix: Remove unnessary reference to suppress warning Dec 15, 2020
@bc-lee
Copy link
Contributor Author

@bc-lee bc-lee commented Dec 15, 2020

@TrueBrain It turns out, fixing this without side effects is almost trivial, so I did it. PTAL.

@TrueBrain TrueBrain merged commit 0471de2 into OpenTTD:master Dec 15, 2020
9 checks passed
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 15, 2020

Thank you very much, also for the quick reply/fix :D Awesome!

@bc-lee bc-lee deleted the feature/suppress-warnin-xcode-12 branch Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants