[nostalgia/core] Replace ContextDeleter with safeDelete(Context*)
All checks were successful
Build / build (push) Successful in 3m15s
All checks were successful
Build / build (push) Successful in 3m15s
This commit is contained in:
parent
894be237f2
commit
7a21b20711
@ -17,11 +17,9 @@ namespace nostalgia::core {
|
||||
|
||||
class Context;
|
||||
|
||||
struct ContextDeleter {
|
||||
void operator()(Context *p) noexcept;
|
||||
};
|
||||
void safeDelete(Context *ctx) noexcept;
|
||||
|
||||
using ContextUPtr = ox::UPtr<Context, ContextDeleter>;
|
||||
using ContextUPtr = ox::UPtr<Context>;
|
||||
|
||||
ox::Result<ContextUPtr> init(turbine::Context &tctx, InitParams const¶ms = {}) noexcept;
|
||||
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
void ContextDeleter::operator()(Context *p) noexcept {
|
||||
ox::safeDelete(p);
|
||||
void safeDelete(Context *ctx) noexcept {
|
||||
delete ctx;
|
||||
}
|
||||
|
||||
Context::Context(turbine::Context &tctx) noexcept: turbineCtx(tctx) {
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
namespace nostalgia::core {
|
||||
|
||||
void ContextDeleter::operator()(Context *p) noexcept {
|
||||
ox::safeDelete(p);
|
||||
void safeDelete(Context *ctx) noexcept {
|
||||
delete ctx;
|
||||
}
|
||||
|
||||
Context::Context(turbine::Context &tctx, InitParams const¶ms) noexcept:
|
||||
|
Loading…
Reference in New Issue
Block a user