From e5d8eb784500c8f6e6ed432c9b12b6ed01850849 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 4 Jun 2019 19:28:46 +0530 Subject: [PATCH] Micro-optimization --- glfw/wl_init.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/glfw/wl_init.c b/glfw/wl_init.c index 259cf2309..fdac7c3c6 100644 --- a/glfw/wl_init.c +++ b/glfw/wl_init.c @@ -168,18 +168,13 @@ static void pointerHandleMotion(void* data, if (window->cursorMode == GLFW_CURSOR_DISABLED) return; - else - { - window->wl.cursorPosX = wl_fixed_to_double(sx); - window->wl.cursorPosY = wl_fixed_to_double(sy); - } + window->wl.cursorPosX = wl_fixed_to_double(sx); + window->wl.cursorPosY = wl_fixed_to_double(sy); switch (window->wl.decorations.focus) { case mainWindow: - _glfwInputCursorPos(window, - wl_fixed_to_double(sx), - wl_fixed_to_double(sy)); + _glfwInputCursorPos(window, window->wl.cursorPosX, window->wl.cursorPosY); return; case topDecoration: if (window->wl.cursorPosY < _GLFW_DECORATION_WIDTH)