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

Incorrect returned value in nk_group_scrolled_offset_begin #581

Open
krys-g opened this issue Oct 14, 2023 · 0 comments
Open

Incorrect returned value in nk_group_scrolled_offset_begin #581

krys-g opened this issue Oct 14, 2023 · 0 comments

Comments

@krys-g
Copy link

krys-g commented Oct 14, 2023

As of version 4.10.6, compiling nuklear.h with #define NK_INCLUDE_STANDARD_BOOL yields the following warning:
enum constant in boolean context [-Wint-in-bool-context]

The issue stems from NK_API nk_bool nk_group_scrolled_offset_begin():

        if (f & NK_WINDOW_CLOSED)
            return NK_WINDOW_CLOSED;
        if (f & NK_WINDOW_MINIMIZED)
            return NK_WINDOW_MINIMIZED;

Given that the function is expected to return "true(1) if visible and fillable with widgets or false(0) otherwise", I'm guessing the two return should be merged into a single return false instead? Currently the conversion from the nk_window_flags enum to bool would return true.

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

No branches or pull requests

1 participant