The Wayback Machine - https://web.archive.org/web/20200831190724/https://github.com/alandefreitas/matplotplusplus/issues/14
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

Bug in QuadContourGenerator::write_cache_quad? #14

Open
mrexodia opened this issue Aug 30, 2020 · 2 comments
Open

Bug in QuadContourGenerator::write_cache_quad? #14

mrexodia opened this issue Aug 30, 2020 · 2 comments

Comments

@mrexodia
Copy link
Contributor

@mrexodia mrexodia commented Aug 30, 2020

Today I was checking out the library and MSVC warns for

std::cout << " BNDY=" << (BOUNDARY_S(quad) > 0) << (BOUNDARY_W(quad) > 0);

BOUNDARY_S returns a bool do the expression is bool > 0

@alandefreitas
Copy link
Owner

@alandefreitas alandefreitas commented Aug 30, 2020

I'll have a look at it. This is a small adaptation on the algorithm matplotlib uses for generating contours (link). Generating contours is more complicated than it seems at first so I needed this external help. Solving problems there is not as easy as solving problems in my own code, so this review might take a while.

@alandefreitas
Copy link
Owner

@alandefreitas alandefreitas commented Aug 30, 2020

BOUNDARY_S(quad) does return a bool, so it doesn't really make sense to compare it with BOUNDARY_S(quad) > 0.
This is just a std::cout and the functions write_cache and write_cache_quad are not really being used anyway (it's just something that came with the original code) so that's not a problem. I could safely change (BOUNDARY_S(quad) > 0) for BOUNDARY_S(quad) but I'll try to understand the logic behind that to fix everything at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.