Closed samr closed 4 years ago
Which compiler warns here?
Both GCC 7.5.0 and Clang 6.0.0 on Linux. We are using the -Werror=shadow flag.
Might be a better idea to disable that warning using a #pragma
. Shadowing is very subjective, I like it and would rather keep on using it when making changes to poly2tri.
Interesting. Ok, np. I have a thing against pragmas, personally. I will withdraw request and fix it in other ways. Thanks.
I meant adding the pragmas to poly2tri though. Would that be better for you?
If you want to add the pragmas, go for it. From the perspective of the project I'm working on, we can likely just tweak the compiler flags in cmake for this particular library, or perhaps maintain our own fork that does not have shadowing issues.
… can cause build failures when one's compiler is configured to flag shadowing as an error.