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

Update Quadrilateral #837

Closed

Conversation

MonkeybreadSoftware
Copy link
Contributor

removed a and b being two variables.
a and b were used fro two different variables.

removed a and b being two variables.
@axxel
Copy link
Collaborator

axxel commented Sep 22, 2024

May I ask what the purpose / intent of this PR is?

@MonkeybreadSoftware
Copy link
Contributor Author

Fixes a compiler warning about two variables a and b with same name and one shadows the other.

@axxel
Copy link
Collaborator

axxel commented Sep 22, 2024

I see. I personally don't consider variable shadowing to be generally bad. Also the library compiles without any warnings in the default cmake config on my system. Did you explicitly enable that warning in yours? If not: what is your compiler/system you use? I assume this warning is showing up while compiling your client code?

@MonkeybreadSoftware
Copy link
Contributor Author

Yes, we compile code with -Weverything using clang and then disable the warnings we don't like.
And if you include zxing in several files and build for multiple platforms, you see these warnings a lot of times.

@axxel
Copy link
Collaborator

axxel commented Sep 22, 2024

Fair enough, I see your point. Is this the only annoying warning you get from including zxing-cpp?

axxel added a commit to axxel/zxing-cpp that referenced this pull request Sep 22, 2024
This should supersede zxing-cpp#837, achieving the same with just one changed line.
@MonkeybreadSoftware
Copy link
Contributor Author

Yes. That is the only warnings we saw. Otherwise it builds fine here.
I used to patch this myself and thought I would contribute this to make it permanent.

@axxel
Copy link
Collaborator

axxel commented Sep 23, 2024

Thanks for your effort. As you can see, I chose a one-liner to achieve the same effect.

@axxel axxel closed this Sep 23, 2024
@MonkeybreadSoftware
Copy link
Contributor Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants