aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-07 15:09:10 +0000
committerJohannes Schickel2008-05-07 15:09:10 +0000
commit311e9165ed3b9442049e9e5e6b25c31d024f04ac (patch)
treea72a266baf6b872300c877f5ed55e8f5cb8ac1dd
parent2d707af33825097e3fd0c001101d9a2691e9ff6f (diff)
downloadscummvm-rg350-311e9165ed3b9442049e9e5e6b25c31d024f04ac.tar.gz
scummvm-rg350-311e9165ed3b9442049e9e5e6b25c31d024f04ac.tar.bz2
scummvm-rg350-311e9165ed3b9442049e9e5e6b25c31d024f04ac.zip
Proper delete[] formatting (this time all occurences should've been changed...)
svn-id: r31929
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp2
-rw-r--r--common/array.h8
-rw-r--r--engines/scumm/smush/channel.cpp6
-rw-r--r--engines/scumm/smush/codec37.cpp2
-rw-r--r--engines/scumm/smush/imuse_channel.cpp6
-rw-r--r--engines/scumm/smush/saud_channel.cpp2
-rw-r--r--engines/scumm/smush/smush_player.cpp4
-rw-r--r--graphics/cursorman.h4
-rw-r--r--test/cxxtest/sample/CreatedTest.h2
-rw-r--r--test/cxxtest/sample/FixtureTest.h2
-rw-r--r--tools/create_kyradat/pak.h4
11 files changed, 21 insertions, 21 deletions
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index dd34f8bf8f..d3e92731db 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -142,7 +142,7 @@ void OSystem_SDL_Symbian::initBackend() {
}
OSystem_SDL_Symbian::~OSystem_SDL_Symbian() {
- delete[]_stereo_mix_buffer;
+ delete[] _stereo_mix_buffer;
}
int OSystem_SDL_Symbian::getDefaultGraphicsMode() const {
diff --git a/common/array.h b/common/array.h
index 24a07b49bf..854ce5b91d 100644
--- a/common/array.h
+++ b/common/array.h
@@ -99,7 +99,7 @@ public:
if (this == &array)
return *this;
- delete [] _data;
+ delete[] _data;
_size = array._size;
_capacity = _size + 32;
_data = new T[_capacity];
@@ -113,7 +113,7 @@ public:
}
void clear() {
- delete [] _data;
+ delete[] _data;
_data = 0;
_size = 0;
_capacity = 0;
@@ -151,7 +151,7 @@ public:
if (old_data) {
// Copy old data
copy(old_data, old_data + _size, _data);
- delete [] old_data;
+ delete[] old_data;
}
}
@@ -166,7 +166,7 @@ public:
// Copy old data
int cnt = (_size < newSize ? _size : newSize);
copy(old_data, old_data + cnt, _data);
- delete [] old_data;
+ delete[] old_data;
}
_size = newSize;
}
diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp
index 836defd6fc..ccf67764e3 100644
--- a/engines/scumm/smush/channel.cpp
+++ b/engines/scumm/smush/channel.cpp
@@ -70,7 +70,7 @@ void SmushChannel::processBuffer() {
_tbufferSize = 0;
}
if (_sbufferSize == 0) {
- delete[]_sbuffer;
+ delete[] _sbuffer;
_sbuffer = 0;
}
} else {
@@ -90,7 +90,7 @@ void SmushChannel::processBuffer() {
if (!_sbuffer)
error("smush channel failed to allocate memory");
memcpy(_sbuffer, _tbuffer + offset, _sbufferSize);
- delete[]_tbuffer;
+ delete[] _tbuffer;
_tbuffer = 0;
_tbufferSize = 0;
} else {
@@ -102,7 +102,7 @@ void SmushChannel::processBuffer() {
error("smush channel failed to allocate memory");
memcpy(_tbuffer, old + offset, new_size);
_tbufferSize = new_size;
- delete[]old;
+ delete[] old;
}
}
}
diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index deabd25595..658d67c1b4 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -52,7 +52,7 @@ Codec37Decoder::Codec37Decoder(int width, int height) {
Codec37Decoder::~Codec37Decoder() {
if (_offsetTable) {
- delete[]_offsetTable;
+ delete[] _offsetTable;
_offsetTable = 0;
_tableLastPitch = -1;
_tableLastIndex = -1;
diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp
index b4d261f4d1..822f32a896 100644
--- a/engines/scumm/smush/imuse_channel.cpp
+++ b/engines/scumm/smush/imuse_channel.cpp
@@ -83,7 +83,7 @@ bool ImuseChannel::appendData(Chunk &b, int32 size) {
if (!_tbuffer)
error("imuse_channel failed to allocate memory");
memcpy(_tbuffer, old, _tbufferSize);
- delete[]old;
+ delete[] old;
b.read(_tbuffer + _tbufferSize, size);
_tbufferSize += size;
} else {
@@ -155,7 +155,7 @@ void ImuseChannel::decode() {
_tbuffer = new byte[new_size];
if (!_tbuffer) error("imuse_channel failed to allocate memory");
memcpy(_tbuffer, old, _tbufferSize);
- delete[]old;
+ delete[] old;
memcpy(_tbuffer + _tbufferSize, _sbuffer + _sbufferSize - remaining_size, remaining_size);
_tbufferSize += remaining_size;
}
@@ -180,7 +180,7 @@ void ImuseChannel::decode() {
value = ((((v2 & 0xf0) << 4) | v3) << 4) - 0x8000;
WRITE_BE_UINT16(decoded, value); decoded += 2;
}
- delete[]_sbuffer;
+ delete[] _sbuffer;
_sbuffer = (byte *)keep;
_sbufferSize = new_size;
}
diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp
index 97f86fe5d9..2fe34efe29 100644
--- a/engines/scumm/smush/saud_channel.cpp
+++ b/engines/scumm/smush/saud_channel.cpp
@@ -135,7 +135,7 @@ bool SaudChannel::appendData(Chunk &b, int32 size) {
if (!_tbuffer)
error("saud_channel failed to allocate memory");
memcpy(_tbuffer, old, _tbufferSize);
- delete[]old;
+ delete[] old;
b.read(_tbuffer + _tbufferSize, size);
_tbufferSize += size;
} else {
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index ec48a09196..494357a90c 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -86,7 +86,7 @@ public:
}
~StringResource() {
for (int32 i = 0; i < _nbStrings; i++) {
- delete[]_strings[i].string;
+ delete[] _strings[i].string;
}
}
@@ -206,7 +206,7 @@ static StringResource *getStrings(ScummEngine *vm, const char *file, bool is_enc
StringResource *sr = new StringResource;
assert(sr);
sr->init(filebuffer, length);
- delete[]filebuffer;
+ delete[] filebuffer;
return sr;
}
diff --git a/graphics/cursorman.h b/graphics/cursorman.h
index c15c65cb94..151038e118 100644
--- a/graphics/cursorman.h
+++ b/graphics/cursorman.h
@@ -152,7 +152,7 @@ private:
}
~Cursor() {
- delete [] _data;
+ delete[] _data;
}
};
@@ -180,7 +180,7 @@ private:
}
~Palette() {
- delete [] _data;
+ delete[] _data;
}
};
diff --git a/test/cxxtest/sample/CreatedTest.h b/test/cxxtest/sample/CreatedTest.h
index 84e8ae8a4b..53a6821a21 100644
--- a/test/cxxtest/sample/CreatedTest.h
+++ b/test/cxxtest/sample/CreatedTest.h
@@ -16,7 +16,7 @@ class CreatedTest : public CxxTest::TestSuite
char *_buffer;
public:
CreatedTest( unsigned size ) : _buffer( new char[size] ) {}
- virtual ~CreatedTest() { delete [] _buffer; }
+ virtual ~CreatedTest() { delete[] _buffer; }
static CreatedTest *createSuite() { return new CreatedTest( 16 ); }
static void destroySuite( CreatedTest *suite ) { delete suite; }
diff --git a/test/cxxtest/sample/FixtureTest.h b/test/cxxtest/sample/FixtureTest.h
index 653c7a14ae..33a119f2bd 100644
--- a/test/cxxtest/sample/FixtureTest.h
+++ b/test/cxxtest/sample/FixtureTest.h
@@ -22,7 +22,7 @@ public:
void tearDown()
{
- delete [] _buffer;
+ delete[] _buffer;
}
void test_strcpy()
diff --git a/tools/create_kyradat/pak.h b/tools/create_kyradat/pak.h
index 1634411f4c..a90b930fcc 100644
--- a/tools/create_kyradat/pak.h
+++ b/tools/create_kyradat/pak.h
@@ -53,8 +53,8 @@ public:
struct FileList {
FileList() : filename(0), size(0), data(0), next(0) {}
~FileList() {
- delete [] filename;
- delete [] data;
+ delete[] filename;
+ delete[] data;
delete next;
}