From e139d26be13127eaaf29cb8c10b61d17277d2477 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Sep 2006 12:12:02 +0000 Subject: Replaces malloc with new in most cases. svn-id: r23881 --- engines/kyra/vqa.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/kyra/vqa.cpp') diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index b0974ae213..233ae07776 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -51,7 +51,7 @@ VQAMovie::~VQAMovie() { void VQAMovie::initBuffers() { for (int i = 0; i < ARRAYSIZE(_buffers); i++) { - _buffers[i].data = NULL; + _buffers[i].data = 0; _buffers[i].size = 0; } } @@ -65,8 +65,8 @@ void *VQAMovie::allocBuffer(int num, uint32 size) { * We could use realloc() here, but we don't actually need the * old contents of the buffer. */ - free(_buffers[num].data); - _buffers[num].data = malloc(size); + delete [] _buffers[num].data; + _buffers[num].data = new uint8[size]; _buffers[num].size = size; } @@ -77,7 +77,7 @@ void *VQAMovie::allocBuffer(int num, uint32 size) { void VQAMovie::freeBuffers() { for (int i = 0; i < ARRAYSIZE(_buffers); i++) { - free(_buffers[i].data); + delete [] _buffers[i].data; _buffers[i].data = NULL; _buffers[i].size = 0; } -- cgit v1.2.3