glfw_gl3: Cast the void* to a struct nk_glfw* (#434)

While it doesn't fix the issue @tree786isback in #434, it is a good thing to cast the void*'s correctly.
This commit is contained in:
Rob Loach 2022-03-22 11:22:22 -04:00 committed by GitHub
parent 9d8f86f223
commit ceee8839ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,7 +346,7 @@ nk_glfw3_mouse_button_callback(GLFWwindow* win, int button, int action, int mods
NK_INTERN void
nk_glfw3_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
{
struct nk_glfw* glfw = usr.ptr;
struct nk_glfw* glfw = (struct nk_glfw*)usr.ptr;
const char *text = glfwGetClipboardString(glfw->win);
if (text) nk_textedit_paste(edit, text, nk_strlen(text));
(void)usr;
@ -355,7 +355,7 @@ nk_glfw3_clipboard_paste(nk_handle usr, struct nk_text_edit *edit)
NK_INTERN void
nk_glfw3_clipboard_copy(nk_handle usr, const char *text, int len)
{
struct nk_glfw* glfw = usr.ptr;
struct nk_glfw* glfw = (struct nk_glfw*)usr.ptr;
char *str = 0;
if (!len) return;
str = (char*)malloc((size_t)len+1);