-
Notifications
You must be signed in to change notification settings - Fork 578
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
const correctness #716
Comments
Same for |
Is this still occuring? |
I'm not sure what you mean. I listed few additional cases that I did not modify for simplicity of my PR - these obviously weren't adressed (unless someone else modified them in the meantime). My PR was merged (#721) so normally I would close this issue but now I see that your own PR (#728) reverted my changes. The PR has barebone commit message and there is no comment anywhere why. Can you tell me what's going on? |
Thanks for catching that. Perhaps a merge conflict occured. I'll have another look. |
I'm wrapping this library into C++ (mostly for ease of use, reduced verbosity and increased code productivity; might release the code at some point) and I have noticed that
const
is rarely used.Now, I know this is an immediate mode library and thus any widget-producing function can not have
const nk_context*
but many getter-only functions such asxxx_get_scroll
for sure can take const context.There are also minor issues in some specific functions, e.g.:
nk_combo
,nk_combobox
and all related functions should takeconst char *const *
, notconst char **
as neither the strings nor the array is modifiedI know very little internals of the library, but this issue is purely on the abstraction level so I should be able to make a PR. This would not be a breaking change. Any thoughts?
The text was updated successfully, but these errors were encountered: