diff --git a/src/olympic/turbine/include/turbine/clipboard.hpp b/src/olympic/turbine/include/turbine/clipboard.hpp index 9a4e4474..fab5844c 100644 --- a/src/olympic/turbine/include/turbine/clipboard.hpp +++ b/src/olympic/turbine/include/turbine/clipboard.hpp @@ -37,7 +37,7 @@ ox::String getClipboardText(Context &ctx) noexcept; void setClipboardText(Context &ctx, ox::CRStringView text) noexcept; -void setClipboardObject(Context &ctx, ox::UniquePtr &&obj) noexcept; +void setClipboardObject(Context &ctx, ox::UPtr &&obj) noexcept; ox::Result getClipboardData(Context &ctx, ox::StringView typeName, int typeVersion) noexcept; diff --git a/src/olympic/turbine/src/glfw/clipboard.cpp b/src/olympic/turbine/src/glfw/clipboard.cpp index 5bbb1fe5..e9374f57 100644 --- a/src/olympic/turbine/src/glfw/clipboard.cpp +++ b/src/olympic/turbine/src/glfw/clipboard.cpp @@ -22,7 +22,7 @@ void setClipboardText(Context &ctx, ox::CRStringView text) noexcept { glfwSetClipboardString(ctx.window, cstr.get()); } -void setClipboardObject(Context &ctx, ox::UniquePtr &&obj) noexcept { +void setClipboardObject(Context &ctx, ox::UPtr &&obj) noexcept { ctx.clipboard = std::move(obj); } diff --git a/src/olympic/turbine/src/glfw/gfx.cpp b/src/olympic/turbine/src/glfw/gfx.cpp index 9b116f6c..13658e7c 100644 --- a/src/olympic/turbine/src/glfw/gfx.cpp +++ b/src/olympic/turbine/src/glfw/gfx.cpp @@ -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(key)]; + auto const eventHandler = keyEventHandler(ctx); + auto const k = keyMap[static_cast(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(glfwGetWindowUserPointer(window)); + auto const ctx = static_cast(glfwGetWindowUserPointer(window)); ctx->uninterruptedRefreshes = 25; } static void handleGlfwKeyEvent(GLFWwindow *window, int key, int, int action, int) noexcept { - const auto ctx = static_cast(glfwGetWindowUserPointer(window)); + auto const ctx = static_cast(glfwGetWindowUserPointer(window)); ctx->uninterruptedRefreshes = 25; if (action == GLFW_PRESS) { handleKeyPress(*ctx, key, true); diff --git a/src/olympic/turbine/src/glfw/turbine.cpp b/src/olympic/turbine/src/glfw/turbine.cpp index e0c8d31a..f48c28cc 100644 --- a/src/olympic/turbine/src/glfw/turbine.cpp +++ b/src/olympic/turbine/src/glfw/turbine.cpp @@ -55,8 +55,8 @@ ox::Result init( static void tickFps(Context &ctx, uint64_t nowMs) noexcept { ++ctx.draws; if (ctx.draws >= 500) { - const auto duration = static_cast(nowMs - ctx.prevFpsCheckTime) / 1000.0; - const auto fps = static_cast(static_cast(ctx.draws) / duration); + auto const duration = static_cast(nowMs - ctx.prevFpsCheckTime) / 1000.0; + auto const fps = static_cast(static_cast(ctx.draws) / duration); if constexpr(config::GlFpsPrint) { oxOutf("FPS: {}\n", fps); } @@ -70,7 +70,7 @@ ox::Error run(Context &ctx) noexcept { int sleepTime = 0; while (!glfwWindowShouldClose(ctx.window)) { glfwPollEvents(); - const auto ticks = ticksMs(ctx); + auto const ticks = ticksMs(ctx); if (ctx.wakeupTime <= ticks) { sleepTime = ctx.updateHandler(ctx); if (sleepTime >= 0) { @@ -108,7 +108,7 @@ void shutdown(Context &ctx) noexcept { uint64_t ticksMs(Context const&ctx) noexcept { using namespace std::chrono; - const auto now = duration_cast(system_clock::now().time_since_epoch()).count(); + auto const now = duration_cast(system_clock::now().time_since_epoch()).count(); return static_cast(now - ctx.startTime); }