diff --git a/src/olympic/turbine/include/turbine/context.hpp b/src/olympic/turbine/include/turbine/context.hpp index ef288747..2108f082 100644 --- a/src/olympic/turbine/include/turbine/context.hpp +++ b/src/olympic/turbine/include/turbine/context.hpp @@ -45,13 +45,12 @@ void setApplicationData(Context &ctx, T *applicationData) noexcept { } [[nodiscard]] -ox::AnyPtr &applicationDataRaw(Context &ctx) noexcept; +ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept; template [[nodiscard]] T *applicationData(Context &ctx) noexcept { - auto const ptr = applicationDataRaw(ctx); - return ptr.get(); + return applicationDataRaw(ctx).get(); } void setKeyEventHandler(Context &ctx, KeyEventHandler h) noexcept; diff --git a/src/olympic/turbine/src/gba/context.cpp b/src/olympic/turbine/src/gba/context.cpp index 389e04c2..37a4c710 100644 --- a/src/olympic/turbine/src/gba/context.cpp +++ b/src/olympic/turbine/src/gba/context.cpp @@ -22,7 +22,7 @@ void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexc ctx.applicationData = applicationData; } -ox::AnyPtr &applicationDataRaw(Context &ctx) noexcept { +ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept { return ctx.applicationData; } diff --git a/src/olympic/turbine/src/glfw/context.cpp b/src/olympic/turbine/src/glfw/context.cpp index 73775482..ed83f007 100644 --- a/src/olympic/turbine/src/glfw/context.cpp +++ b/src/olympic/turbine/src/glfw/context.cpp @@ -24,7 +24,7 @@ void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexc ctx.applicationData = applicationData; } -ox::AnyPtr &applicationDataRaw(Context &ctx) noexcept { +ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept { return ctx.applicationData; }