[olympic/turbine] East const Turbine, cleanup

This commit is contained in:
2023-12-15 00:54:48 -06:00
parent 58d13a3ad9
commit 72e54da017
4 changed files with 11 additions and 11 deletions

View File

@@ -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);