[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;
|
class Context;
|
||||||
|
|
||||||
struct ContextDeleter {
|
void safeDelete(Context *ctx) noexcept;
|
||||||
void operator()(Context *p) noexcept;
|
|
||||||
};
|
|
||||||
|
|
||||||
using ContextUPtr = ox::UPtr<Context, ContextDeleter>;
|
using ContextUPtr = ox::UPtr<Context>;
|
||||||
|
|
||||||
ox::Result<ContextUPtr> init(turbine::Context &tctx, InitParams const¶ms = {}) noexcept;
|
ox::Result<ContextUPtr> init(turbine::Context &tctx, InitParams const¶ms = {}) noexcept;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
namespace nostalgia::core {
|
namespace nostalgia::core {
|
||||||
|
|
||||||
void ContextDeleter::operator()(Context *p) noexcept {
|
void safeDelete(Context *ctx) noexcept {
|
||||||
ox::safeDelete(p);
|
delete ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
Context::Context(turbine::Context &tctx) noexcept: turbineCtx(tctx) {
|
Context::Context(turbine::Context &tctx) noexcept: turbineCtx(tctx) {
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
namespace nostalgia::core {
|
namespace nostalgia::core {
|
||||||
|
|
||||||
void ContextDeleter::operator()(Context *p) noexcept {
|
void safeDelete(Context *ctx) noexcept {
|
||||||
ox::safeDelete(p);
|
delete ctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
Context::Context(turbine::Context &tctx, InitParams const¶ms) noexcept:
|
Context::Context(turbine::Context &tctx, InitParams const¶ms) noexcept:
|
||||||
|
Loading…
Reference in New Issue
Block a user