From 2ec65975046c3aa98f2958ca0988d20a36abf5fa Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 25 Dec 2002 14:26:31 +0000 Subject: Bleh --- lib/engine.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/engine.cc') diff --git a/lib/engine.cc b/lib/engine.cc index bcf5dc0..84014c7 100644 --- a/lib/engine.cc +++ b/lib/engine.cc @@ -26,7 +26,6 @@ int mogltk::engine::GetInited() { class embedRWops : public Base { public: embedRWops(Handle *); - ~embedRWops(); int seek(int, int); int read(void *, int, int); int write(const void *, int, int); @@ -34,11 +33,7 @@ class embedRWops : public Base { Handle * h; }; -embedRWops::embedRWops(Handle * ah) : h(new Handle(*ah)) {} - -embedRWops::~embedRWops() { - delete h; -} +embedRWops::embedRWops(Handle * ah) : h(ah) {} int embedRWops::seek(int offset, int whence) { return h->seek(offset, whence); @@ -73,6 +68,7 @@ static int embedRWwrite(SDL_RWops * context, const void * ptr, int size, int num static int embedRWclose(SDL_RWops * context) { if (context->hidden.unknown.data1) { delete ((embedRWops *)(context->hidden.unknown.data1)); + context->hidden.unknown.data1 = 0; return 0; } return -1; -- cgit v1.2.3