[turbine] Make applicationData return const&
All checks were successful
Build / build (push) Successful in 2m35s
All checks were successful
Build / build (push) Successful in 2m35s
This commit is contained in:
parent
41e08d67aa
commit
e3c74637db
@ -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<typename T>
|
||||
[[nodiscard]]
|
||||
T *applicationData(Context &ctx) noexcept {
|
||||
auto const ptr = applicationDataRaw(ctx);
|
||||
return ptr.get<T>();
|
||||
return applicationDataRaw(ctx).get<T>();
|
||||
}
|
||||
|
||||
void setKeyEventHandler(Context &ctx, KeyEventHandler h) noexcept;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user