[nostalgia] Replace delete with safeDelete
This commit is contained in:
parent
eea466750c
commit
3dd60965c4
@ -58,7 +58,7 @@ ox::Error run(Context *ctx) noexcept {
|
||||
renderer::shutdown(ctx, ctx->rendererData<void>());
|
||||
glfwDestroyWindow(id->window);
|
||||
ctx->setWindowerData(nullptr);
|
||||
delete id;
|
||||
ox::safeDelete(id);
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ ox::Error init(Context *ctx, void **rendererData) noexcept {
|
||||
|
||||
void shutdown(Context*, void *rendererData) noexcept {
|
||||
const auto id = reinterpret_cast<GlImplData*>(rendererData);
|
||||
delete id;
|
||||
ox::safeDelete(id);
|
||||
}
|
||||
|
||||
void loadBgTexture(void *rendererData, int section, void *pixels, int w, int h) noexcept {
|
||||
|
@ -29,7 +29,7 @@ ox::Result<char*> loadRom(const char *path) noexcept {
|
||||
}
|
||||
|
||||
void unloadRom(char *rom) noexcept {
|
||||
delete rom;
|
||||
ox::safeDelete(rom);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ ox::Error Zone::init(Context *ctx, Bounds bnds, ox::FileAddress tileSheet, ox::F
|
||||
}
|
||||
|
||||
Zone::~Zone() {
|
||||
delete[] m_tiles;
|
||||
ox::safeDeleteArray(m_tiles);
|
||||
}
|
||||
|
||||
void Zone::draw(Context *ctx) {
|
||||
|
Loading…
Reference in New Issue
Block a user