[olympic/turbine] East const Turbine, cleanup
This commit is contained in:
@@ -30,7 +30,7 @@ void removeDrawer(Context &ctx, Drawer *cd) noexcept {
|
||||
|
||||
}
|
||||
|
||||
static void handleGlfwError(int err, const char *desc) noexcept {
|
||||
static void handleGlfwError(int err, char const*desc) noexcept {
|
||||
oxErrf("GLFW error ({}): {}\n", err, desc);
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ static void handleKeyPress(Context &ctx, int key, bool down) noexcept {
|
||||
map[GLFW_KEY_ESCAPE] = Key::Escape;
|
||||
return map;
|
||||
}();
|
||||
const auto eventHandler = keyEventHandler(ctx);
|
||||
const auto k = keyMap[static_cast<std::size_t>(key)];
|
||||
auto const eventHandler = keyEventHandler(ctx);
|
||||
auto const k = keyMap[static_cast<std::size_t>(key)];
|
||||
setKeyDownStatus(ctx, k, down);
|
||||
if (eventHandler) {
|
||||
eventHandler(ctx, k, down);
|
||||
@@ -69,12 +69,12 @@ static void handleGlfwCursorPosEvent(GLFWwindow*, double, double) noexcept {
|
||||
}
|
||||
|
||||
static void handleGlfwMouseButtonEvent(GLFWwindow *window, int, int, int) noexcept {
|
||||
const auto ctx = static_cast<Context*>(glfwGetWindowUserPointer(window));
|
||||
auto const ctx = static_cast<Context*>(glfwGetWindowUserPointer(window));
|
||||
ctx->uninterruptedRefreshes = 25;
|
||||
}
|
||||
|
||||
static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int) noexcept {
|
||||
const auto ctx = static_cast<Context*>(glfwGetWindowUserPointer(window));
|
||||
auto const ctx = static_cast<Context*>(glfwGetWindowUserPointer(window));
|
||||
ctx->uninterruptedRefreshes = 25;
|
||||
if (action == GLFW_PRESS) {
|
||||
handleKeyPress(*ctx, key, true);
|
||||
|
Reference in New Issue
Block a user