Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Compile error: C++20 strict

Open Nielsbishere opened this issue 5 years ago • 3 comments

The following is deemed as deprecated by the C++20 standard; Having an enum that's used for initialization in another enum by bitwise operation. This: NK_EDIT_SIMPLE | (result from nk_edit_flags or) aka nk_edit_types | nk_edit_flags. Is now not legal anymore in W3 Wall. I'd say that the solution is for nk_edit_types and nk_edit_flags to be into one enum or explicitly cast. In my own branch I opted for the first approach.

Nielsbishere avatar Jul 31 '20 14:07 Nielsbishere

Same goes for: nk_panel_type and nk_panel_set. nk_window_flags and NK_WINDOW_NOT_INTERACTIVE using nk_panel_flags. Since C-Style naming is used (NK_PANEL_SET_...) and the enum names aren't used. I'd say just combining them is no problem.

For nk_panel_flags I'd suggest casting NK_WINDOW_NO_INPUT to an int before orring.

Nielsbishere avatar Jul 31 '20 14:07 Nielsbishere

Could you post the full error log, along with a suggested fix? Any pull requests would be awesome too.

RobLoach avatar Dec 27 '21 02:12 RobLoach

@RobLoach this is part of the large PR

Nielsbishere avatar Dec 27 '21 11:12 Nielsbishere

Feel free to suggest follow ups as you wish!

RobLoach avatar Mar 16 '24 23:03 RobLoach