diff options
author | Johannes Schickel | 2006-09-16 12:12:02 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-09-16 12:12:02 +0000 |
commit | e139d26be13127eaaf29cb8c10b61d17277d2477 (patch) | |
tree | 63e7c972b4e04386ca23ad9cf931dce3bbcc862b /engines/kyra/vqa.cpp | |
parent | 394839951163852bc0aea538b5d5a3924ec743c8 (diff) | |
download | scummvm-rg350-e139d26be13127eaaf29cb8c10b61d17277d2477.tar.gz scummvm-rg350-e139d26be13127eaaf29cb8c10b61d17277d2477.tar.bz2 scummvm-rg350-e139d26be13127eaaf29cb8c10b61d17277d2477.zip |
Replaces malloc with new in most cases.
svn-id: r23881
Diffstat (limited to 'engines/kyra/vqa.cpp')
-rw-r--r-- | engines/kyra/vqa.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |