[nostalgia/core] Replace ContextDeleter with safeDelete(Context*)
All checks were successful
Build / build (push) Successful in 3m15s

This commit is contained in:
Gary Talent 2025-01-18 20:57:15 -06:00
parent 894be237f2
commit 7a21b20711
3 changed files with 6 additions and 8 deletions

View File

@ -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&params = {}) noexcept;

View File

@ -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) {

View File

@ -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&params) noexcept: