untyped pointers fail when you use c++ compiler
This commit is contained in:
parent
2156b95a5d
commit
fa9f257c7b
@ -315,7 +315,7 @@ nk_glfw3_render(struct nk_glfw* glfw, enum nk_anti_aliasing AA, int max_vertex_b
|
|||||||
NK_API void
|
NK_API void
|
||||||
nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
|
nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
|
||||||
{
|
{
|
||||||
struct nk_glfw* glfw = glfwGetWindowUserPointer(win);
|
struct nk_glfw* glfw = (struct nk_glfw *)glfwGetWindowUserPointer(win);
|
||||||
if (glfw->text_len < NK_GLFW_TEXT_MAX)
|
if (glfw->text_len < NK_GLFW_TEXT_MAX)
|
||||||
glfw->text[glfw->text_len++] = codepoint;
|
glfw->text[glfw->text_len++] = codepoint;
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ nk_glfw3_char_callback(GLFWwindow *win, unsigned int codepoint)
|
|||||||
NK_API void
|
NK_API void
|
||||||
nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
|
nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
|
||||||
{
|
{
|
||||||
struct nk_glfw* glfw = glfwGetWindowUserPointer(win);
|
struct nk_glfw* glfw = (struct nk_glfw *)glfwGetWindowUserPointer(win);
|
||||||
(void)xoff;
|
(void)xoff;
|
||||||
glfw->scroll.x += (float)xoff;
|
glfw->scroll.x += (float)xoff;
|
||||||
glfw->scroll.y += (float)yoff;
|
glfw->scroll.y += (float)yoff;
|
||||||
@ -332,7 +332,7 @@ nk_gflw3_scroll_callback(GLFWwindow *win, double xoff, double yoff)
|
|||||||
NK_API void
|
NK_API void
|
||||||
nk_glfw3_mouse_button_callback(GLFWwindow* win, int button, int action, int mods)
|
nk_glfw3_mouse_button_callback(GLFWwindow* win, int button, int action, int mods)
|
||||||
{
|
{
|
||||||
struct nk_glfw* glfw = glfwGetWindowUserPointer(win);
|
struct nk_glfw* glfw = (struct nk_glfw *)glfwGetWindowUserPointer(win);
|
||||||
double x, y;
|
double x, y;
|
||||||
NK_UNUSED(mods);
|
NK_UNUSED(mods);
|
||||||
if (button != GLFW_MOUSE_BUTTON_LEFT) return;
|
if (button != GLFW_MOUSE_BUTTON_LEFT) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user