Optimize the services implementation

Dont construct the selection string when we are merely checking if a
selection exists.
This commit is contained in:
Kovid Goyal
2023-02-01 12:44:49 +05:30
parent 1c6bae636b
commit 682428fb54
10 changed files with 55 additions and 9 deletions

7
glfw/init.c vendored
View File

@@ -395,3 +395,10 @@ GLFWAPI GLFWcurrentselectionfun glfwSetCurrentSelectionCallback(GLFWcurrentselec
_GLFW_SWAP_POINTERS(_glfw.callbacks.get_current_selection, cbfun);
return cbfun;
}
GLFWAPI GLFWhascurrentselectionfun glfwSetHasCurrentSelectionCallback(GLFWhascurrentselectionfun cbfun)
{
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
_GLFW_SWAP_POINTERS(_glfw.callbacks.has_current_selection, cbfun);
return cbfun;
}