Skip to content

there are several stuct fields with int types but bool semantics (and all kinds of integer shenanigans) #891

Description

@sleeptightAnsiC

This is a follow up from #883

Change the field type in nk_style_slider and nk_style_scrollbar to nk_bool.

I would rather not do this. Not only there are way more int fields with bool semantics like these two, there is simply no other use of nk_bool type anywhere in the style structs (EDIT: I think I found one somewhere). If you want these two changed, you should probably also change other similar fields elsewhere [...]

I may missing something, but I’m not entirely sure why this issue is being generalized to such a broad scope in the discussion. [...] broadening the problem to all similar cases, the conclusion naturally becomes that fixing it would be complex and risky. To me, this feels like a conceptual trap.

Those were the only ones that we had the code coverage to catch.

int use_clipping;

int show_buttons;

int show_buttons;

int cursor_visible;

int use_pool;

^ Those are the ones I was able to quickly find. There are probably more.

I personally do NOT want to change any of this. It can cause more issues like #812 and this isn't affecting any new code anyway. I gave many reasons under #883 why changing any of those struct fields is risky.

I'm only reporting this for the sake of documenting. I will not be doing anything about it myself, and would suggest everyone else to ignore it, at least for now.

Edit: related to: #183 ; #185

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions