[olympic,nostalgia] Cleanup style
All checks were successful
Build / build (push) Successful in 1m18s

This commit is contained in:
2025-06-24 01:59:22 -05:00
parent f847289bd4
commit 9f040392c7
30 changed files with 93 additions and 93 deletions

View File

@ -28,7 +28,7 @@ class ClipboardObject: public BaseClipboardObject {
}
};
ox::String getClipboardText(Context &ctx) noexcept;
ox::String getClipboardText(Context const &ctx) noexcept;
void setClipboardText(Context &ctx, ox::StringViewCR text) noexcept;

View File

@ -15,11 +15,11 @@ class Context;
void safeDelete(Context *p);
keel::Context const&keelCtx(Context const&ctx) noexcept;
keel::Context const &keelCtx(Context const &ctx) noexcept;
keel::Context &keelCtx(Context &ctx) noexcept;
inline ox::FileSystem const*rom(Context const&ctx) noexcept {
inline ox::FileSystem const*rom(Context const &ctx) noexcept {
return keelCtx(ctx).rom.get();
}
@ -27,7 +27,7 @@ inline ox::FileSystem *rom(Context &ctx) noexcept {
return keelCtx(ctx).rom.get();
}
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexcept;
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const &applicationData) noexcept;
template<typename T>
void setApplicationData(Context &ctx, T *applicationData) noexcept {
@ -35,7 +35,7 @@ void setApplicationData(Context &ctx, T *applicationData) noexcept {
}
[[nodiscard]]
ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept;
ox::AnyPtr const &applicationDataRaw(Context &ctx) noexcept;
template<typename T>
[[nodiscard]]

View File

@ -41,7 +41,7 @@ ox::Size getScreenSize(Context const &ctx) noexcept;
ox::Bounds getWindowBounds(Context const &ctx) noexcept;
ox::Error setWindowBounds(Context &ctx, ox::Bounds const&bnds) noexcept;
ox::Error setWindowBounds(Context &ctx, ox::Bounds const &bnds) noexcept;
/**
* Tells Turbine to refresh the screen within the specified period of time.

View File

@ -89,7 +89,7 @@ void setMouseButtonEventHandler(Context &ctx, MouseButtonEventHandler h) noexcep
KeyEventHandler keyEventHandler(Context const &ctx) noexcept;
[[nodiscard]]
bool buttonDown(Context const&ctx, Key) noexcept;
bool buttonDown(Context const &ctx, Key) noexcept;
ox::Result<ox::UPtr<Context>> init(ox::UPtr<ox::FileSystem> &&fs, ox::StringViewCR appName) noexcept;
@ -100,7 +100,7 @@ ox::Error run(Context &ctx) noexcept;
// Returns the number of milliseconds that have passed since the start of the
// program.
[[nodiscard]]
TimeMs ticksMs(Context const&ctx) noexcept;
TimeMs ticksMs(Context const &ctx) noexcept;
void requestShutdown(Context &ctx, bool force = false) noexcept;

View File

@ -9,7 +9,7 @@
namespace turbine {
ox::String getClipboardText(Context&) noexcept {
ox::String getClipboardText(Context const &) noexcept {
return {};
}

View File

@ -10,7 +10,7 @@ void safeDelete(Context *p) {
delete p;
}
keel::Context const&keelCtx(Context const&ctx) noexcept {
keel::Context const &keelCtx(Context const &ctx) noexcept {
return ctx.keelCtx;
}
@ -18,11 +18,11 @@ keel::Context &keelCtx(Context &ctx) noexcept {
return ctx.keelCtx;
}
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexcept {
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const &applicationData) noexcept {
ctx.applicationData = applicationData;
}
ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept {
ox::AnyPtr const &applicationDataRaw(Context &ctx) noexcept {
return ctx.applicationData;
}

View File

@ -23,8 +23,8 @@ class Context final {
Context() noexcept = default;
Context(Context &other) noexcept = delete;
Context(Context const&other) noexcept = delete;
Context(Context const&&other) noexcept = delete;
Context(Context const &other) noexcept = delete;
Context(Context const &&other) noexcept = delete;
};

View File

@ -12,7 +12,7 @@
namespace turbine {
ox::String getClipboardText(Context &ctx) noexcept {
ox::String getClipboardText(Context const &ctx) noexcept {
return ox::String(glfwGetClipboardString(ctx.window));
}

View File

@ -12,7 +12,7 @@ void safeDelete(Context *p) {
delete p;
}
keel::Context const&keelCtx(Context const&ctx) noexcept {
keel::Context const &keelCtx(Context const &ctx) noexcept {
return ctx.keelCtx;
}
@ -20,11 +20,11 @@ keel::Context &keelCtx(Context &ctx) noexcept {
return ctx.keelCtx;
}
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const&applicationData) noexcept {
void setApplicationDataRaw(Context &ctx, ox::AnyPtr const &applicationData) noexcept {
ctx.applicationData = applicationData;
}
ox::AnyPtr const&applicationDataRaw(Context &ctx) noexcept {
ox::AnyPtr const &applicationDataRaw(Context &ctx) noexcept {
return ctx.applicationData;
}

View File

@ -35,8 +35,8 @@ class Context {
Context() noexcept = default;
Context(Context const&other) noexcept = delete;
Context(Context const&&other) noexcept = delete;
Context(Context const &other) noexcept = delete;
Context(Context const &&other) noexcept = delete;
};

View File

@ -214,7 +214,7 @@ ox::Bounds getWindowBounds(Context const &ctx) noexcept {
return bnds;
}
ox::Error setWindowBounds(Context &ctx, ox::Bounds const&bnds) noexcept {
ox::Error setWindowBounds(Context &ctx, ox::Bounds const &bnds) noexcept {
glfwSetWindowPos(ctx.window, bnds.x, bnds.y);
glfwSetWindowSize(ctx.window, bnds.width, bnds.height);
return {};
@ -430,13 +430,13 @@ ox::Error run(Context &ctx) noexcept {
return {};
}
TimeMs ticksMs(Context const&ctx) noexcept {
TimeMs ticksMs(Context const &ctx) noexcept {
using namespace std::chrono;
auto const now = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
return static_cast<TimeMs>(now) - ctx.startTime;
}
bool buttonDown(Context const&ctx, Key const key) noexcept {
bool buttonDown(Context const &ctx, Key const key) noexcept {
return (ctx.keysDown >> static_cast<int>(key)) & 1;
}