diff options
-rw-r--r-- | backends/fs/amigaos4/amigaos4-fs.cpp | 10 | ||||
-rw-r--r-- | backends/midi/dmedia.cpp | 2 | ||||
-rw-r--r-- | backends/platform/symbian/src/SymbianOS.cpp | 2 | ||||
-rw-r--r-- | engines/agi/preagi_mickey.cpp | 8 | ||||
-rw-r--r-- | engines/agos/agos.cpp | 8 | ||||
-rw-r--r-- | engines/lure/res.cpp | 2 | ||||
-rw-r--r-- | engines/lure/res_struct.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/dialogs.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/nut_renderer.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/smush/channel.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/smush/codec37.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/smush/imuse_channel.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/smush/saud_channel.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/smush/smush_player.cpp | 4 | ||||
-rw-r--r-- | engines/sword2/resman.cpp | 6 | ||||
-rw-r--r-- | graphics/imageman.cpp | 2 | ||||
-rw-r--r-- | gui/ListWidget.cpp | 2 | ||||
-rw-r--r-- | gui/ThemeModern.cpp | 8 | ||||
-rw-r--r-- | gui/console.cpp | 2 | ||||
-rw-r--r-- | gui/theme.cpp | 8 | ||||
-rw-r--r-- | sound/audiostream.cpp | 2 | ||||
-rw-r--r-- | sound/softsynth/ym2612.cpp | 12 | ||||
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 20 | ||||
-rw-r--r-- | tools/create_kyradat/pak.cpp | 2 |
25 files changed, 70 insertions, 70 deletions
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp index 3f4ba18a30..5bf57ddf34 100644 --- a/backends/fs/amigaos4/amigaos4-fs.cpp +++ b/backends/fs/amigaos4/amigaos4-fs.cpp @@ -209,7 +209,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam if (IDOS->NameFromLock(pLock, (STRPTR)n, bufSize) != DOSFALSE) { _sPath = n; _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart((STRPTR)n); - delete [] n; + delete[] n; break; } @@ -217,12 +217,12 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam _bIsValid = false; debug(6, "IoErr() != ERROR_LINE_TOO_LONG"); LEAVE(); - delete [] n; + delete[] n; return; } bufSize *= 2; - delete [] n; + delete[] n; } _bIsValid = false; @@ -536,7 +536,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const { sprintf(buffer, "%s (%s)", volName, devName); - delete [] devName; + delete[] devName; AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(volumeLock, buffer); if (entry) { @@ -554,7 +554,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const { IDOS->UnLock(volumeLock); } - delete [] volName; + delete[] volName; } dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES); } diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index 6865f3e537..1904eaf647 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL:$ + * $URL$ * $Id: dmedia.cpp$ */ diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 3e34025eab..dd34f8bf8f 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/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 6944eee9f2..08f8969ca3 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -238,7 +238,7 @@ bool Mickey::checkMenu() { memcpy(buffer, &menu, sizeof(MSA_MENU)); getMenuSel(buffer, &iSel0, &iSel1); - delete [] buffer; + delete[] buffer; return parse(menu.cmd[iSel0].data[iSel1], menu.arg[iSel0].data[iSel1]); } @@ -645,7 +645,7 @@ void Mickey::playSound(ENUM_MSA_SOUND iSound) { case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONUP: case Common::EVENT_KEYDOWN: - delete [] buffer; + delete[] buffer; return; default: break; @@ -657,7 +657,7 @@ void Mickey::playSound(ENUM_MSA_SOUND iSound) { break; } - delete [] buffer; + delete[] buffer; } // Graphics @@ -893,7 +893,7 @@ void Mickey::drawLogo() { _vm->_picture->showPic(10, 10, w, h); - delete [] buffer; + delete[] buffer; } void Mickey::animate() { diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 015aff3458..a79b84843c 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -879,7 +879,7 @@ AGOSEngine::~AGOSEngine() { _midi.close(); for (uint i = 0; i < _itemHeap.size(); i++) { - delete [] _itemHeap[i]; + delete[] _itemHeap[i]; } _itemHeap.clear(); @@ -908,7 +908,7 @@ AGOSEngine::~AGOSEngine() { delete _dummyItem3; delete _dummyWindow; - delete [] _windowList; + delete[] _windowList; delete _debugger; delete _moviePlay; @@ -1017,7 +1017,7 @@ void AGOSEngine::shutdown() { _midi.close(); for (uint i = 0; i < _itemHeap.size(); i++) { - delete [] _itemHeap[i]; + delete[] _itemHeap[i]; } _itemHeap.clear(); @@ -1046,7 +1046,7 @@ void AGOSEngine::shutdown() { delete _dummyItem3; delete _dummyWindow; - delete [] _windowList; + delete[] _windowList; delete _debugger; delete _moviePlay; diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index ce35b50243..f2997d5d17 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -85,7 +85,7 @@ void Resources::freeData() { delete _talkDialogData; delete _messagesData; delete _cursors; - delete [] _charOffsets; + delete[] _charOffsets; } struct AnimRecordTemp { diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index fcb6b874be..913505c8c9 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -1008,8 +1008,8 @@ RandomActionSet::RandomActionSet(uint16 *&offset) { } RandomActionSet::~RandomActionSet() { - delete [] _types; - delete [] _ids; + delete[] _types; + delete[] _ids; } RandomActionSet *RandomActionList::getRoom(uint16 roomNumber) { diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 5b6c2bcf35..6d1cf1bbd8 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -692,8 +692,8 @@ void HelpDialog::displayKeyBindings() { _dsc[i]->setLabel(dscStr[i]); } - delete [] keyStr; - delete [] dscStr; + delete[] keyStr; + delete[] dscStr; } void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp index 71182ca7a0..d56017c6f5 100644 --- a/engines/scumm/nut_renderer.cpp +++ b/engines/scumm/nut_renderer.cpp @@ -41,8 +41,8 @@ NutRenderer::NutRenderer(ScummEngine *vm, const char *filename) : } NutRenderer::~NutRenderer() { - delete [] _charBuffer; - delete [] _decodedData; + delete[] _charBuffer; + delete[] _decodedData; } void smush_decode_codec1(byte *dst, const byte *src, int left, int top, int width, int height, int pitch); @@ -254,14 +254,14 @@ void NutRenderer::loadFont(const char *filename) { offset += (dstPitch * _chars[l].height); } - delete [] _decodedData; + delete[] _decodedData; _decodedData = compressedData; _charBuffer = new byte[_maxCharSize]; } - delete [] dataSrc; - delete [] _paletteMap; + delete[] dataSrc; + delete[] _paletteMap; } int NutRenderer::getCharWidth(byte c) const { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index c99856b3a3..2f0593dca8 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -555,8 +555,8 @@ ScummEngine::~ScummEngine() { for (int i = 0; i < _numActors; ++i) delete _actors[i]; - delete [] _actors; - delete [] _sortedActors; + delete[] _actors; + delete[] _sortedActors; delete _2byteFontPtr; delete _charset; @@ -903,7 +903,7 @@ ScummEngine_v8::ScummEngine_v8(OSystem *syst, const DetectorResult &dr) } ScummEngine_v8::~ScummEngine_v8() { - delete [] _objectIDMap; + delete[] _objectIDMap; } #endif diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp index 5b8cd3a853..836defd6fc 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 0c1db13a26..deabd25595 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 3a0efbc6b7..b4d261f4d1 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 17296704ea..97f86fe5d9 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 906395c0ca..ec48a09196 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/engines/sword2/resman.cpp b/engines/sword2/resman.cpp index 88a1f6251a..d6b8025cda 100644 --- a/engines/sword2/resman.cpp +++ b/engines/sword2/resman.cpp @@ -191,7 +191,7 @@ bool ResourceManager::init() { if (cdInf[i].cd == 0 && !Common::File::exists((char *)cdInf[i].clusterName)) { _vm->GUIErrorMessage("Broken Sword 2: Cannot find " + Common::String((char *)cdInf[i].clusterName)); - delete [] cdInf; + delete[] cdInf; return false; } } @@ -205,7 +205,7 @@ bool ResourceManager::init() { } if (j == _totalClusters) { - delete [] cdInf; + delete[] cdInf; _vm->GUIErrorMessage(Common::String(_resFiles[i].fileName) + " is not in cd.inf"); return false; } @@ -213,7 +213,7 @@ bool ResourceManager::init() { _resFiles[i].cd = cdInf[j].cd; } - delete [] cdInf; + delete[] cdInf; debug(1, "%d resources in %d cluster files", _totalResFiles, _totalClusters); for (i = 0; i < _totalClusters; i++) diff --git a/graphics/imageman.cpp b/graphics/imageman.cpp index 6ab64e8bca..83ffc40c99 100644 --- a/graphics/imageman.cpp +++ b/graphics/imageman.cpp @@ -110,7 +110,7 @@ bool ImageManager::registerSurface(const Common::String &name, Surface *surf) { unzCloseCurrentFile(file->file); Common::MemoryReadStream stream(buffer, fileInfo.uncompressed_size); surf = ImageDecoder::loadFile(stream); - delete [] buffer; + delete[] buffer; if (!surf) return false; diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index c43a0f64d7..80898d06c8 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -495,7 +495,7 @@ void ListWidget::reflowLayout() { _entriesPerPage = (_h - _topPadding - _bottomPadding) / kLineHeight; - delete [] _textWidth; + delete[] _textWidth; _textWidth = new int[_entriesPerPage]; for (int i = 0; i < _entriesPerPage; i++) diff --git a/gui/ThemeModern.cpp b/gui/ThemeModern.cpp index 69595eb219..177171b40c 100644 --- a/gui/ThemeModern.cpp +++ b/gui/ThemeModern.cpp @@ -114,8 +114,8 @@ _forceRedraw(false), _lastUsedBitMask(0), _fonts(), _cursor(0), _imageHandles(), ThemeModern::~ThemeModern() { deleteFonts(); deinit(); - delete [] _images; - delete [] _cursor; + delete[] _images; + delete[] _cursor; _images = 0; for (int i = 0; i < kImageHandlesMax; ++i) { ImageMan.unregisterSurface(_imageHandles[i]); @@ -1470,7 +1470,7 @@ void ThemeModern::createCursor() { _system->colorToRGB(_colors[kColorTransparency], r, g, b); uint16 transparency = RGBToColor<ColorMasks<565> >(r, g, b); - delete [] _cursor; + delete[] _cursor; _cursor = new byte[_cursorWidth * _cursorHeight]; assert(_cursor); @@ -1502,7 +1502,7 @@ void ThemeModern::createCursor() { } _useCursor = true; - delete [] table; + delete[] table; } #pragma mark - diff --git a/gui/console.cpp b/gui/console.cpp index b57ccbdaa6..728724d76f 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -295,7 +295,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { keepRunning = (*_callbackProc)(this, str, _callbackRefCon); // Get rid of the string buffer - delete [] str; + delete[] str; } print(PROMPT); diff --git a/gui/theme.cpp b/gui/theme.cpp index a044769bfd..c8501c4f91 100644 --- a/gui/theme.cpp +++ b/gui/theme.cpp @@ -82,7 +82,7 @@ const Graphics::Font *Theme::loadFont(const char *filename) { font = Graphics::NewFont::loadFromCache(stream); - delete [] buffer; + delete[] buffer; buffer = 0; } unzClose(zipFile); @@ -112,7 +112,7 @@ const Graphics::Font *Theme::loadFont(const char *filename) { font = Graphics::NewFont::loadFont(stream); - delete [] buffer; + delete[] buffer; buffer = 0; } unzClose(zipFile); @@ -175,7 +175,7 @@ bool Theme::loadConfigFile(const Common::String &stylefile) { unzClose(zipFile); return false; } - delete [] buffer; + delete[] buffer; buffer = 0; } else { unzClose(zipFile); @@ -225,7 +225,7 @@ bool Theme::themeConfigUseable(const Common::String &stylefile, const Common::St unzClose(zipFile); return false; } - delete [] buffer; + delete[] buffer; buffer = 0; } } else { diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 771baf351a..0fba6affdb 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -300,7 +300,7 @@ int AppendableMemoryStream<stereo, is16Bit, isUnsigned, isLE>::readBuffer(int16 assert(buf.start <= _pos && _pos <= buf.end); const int samplesLeftInCurBuffer = buf.end - _pos; if (samplesLeftInCurBuffer == 0) { - delete [] buf.start; + delete[] buf.start; _bufferQueue.erase(_bufferQueue.begin()); _pos = 0; continue; diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 57ad0f1c62..1e985aeb1c 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -742,12 +742,12 @@ void MidiDriver_YM2612::createLookupTables() { } void MidiDriver_YM2612::removeLookupTables() { - delete [] sintbl; - delete [] powtbl; - delete [] frequencyTable; - delete [] keycodeTable; - delete [] keyscaleTable; - delete [] attackOut; + delete[] sintbl; + delete[] powtbl; + delete[] frequencyTable; + delete[] keycodeTable; + delete[] keyscaleTable; + delete[] attackOut; sintbl = powtbl = frequencyTable = keycodeTable = keyscaleTable = attackOut = 0; } diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 1e6b779c7d..8ca0f61edc 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -586,7 +586,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint while (ptr < endOffs) { if (ptr[1]) { error("invalid sequence data encountered"); - delete [] buffer; + delete[] buffer; return false; } @@ -743,7 +743,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint WRITE_BE_UINT16(finHeader, numSequences); WRITE_BE_UINT16(&finHeader[numSequences + 1], numNestedSequences); memcpy (finBuffer + finHeaderSize, buffer + headerSize, finBufferSize - finHeaderSize); - delete [] buffer; + delete[] buffer; finHeader = (uint16*) (finBuffer + ((numSequences + 2) * sizeof(uint16))); for (int i = 0; i < numNestedSequences; i++) { @@ -988,14 +988,14 @@ bool updateIndex(PAKFile &out, const Game *g) { memcpy(index, data, size); if (!updateIndex(index, kIndexSize, g)) { - delete [] index; + delete[] index; return false; } out.removeFile(filename); if (!out.addFile(filename, index, kIndexSize)) { fprintf(stderr, "ERROR: couldn't update %s file", filename); - delete [] index; + delete[] index; return false; } @@ -1049,7 +1049,7 @@ int main(int argc, char *argv[]) { if (fread(buffer, 1, size, input) != size) { warning("couldn't read from file '%s', skipping it", argv[i]); - delete [] buffer; + delete[] buffer; fclose(input); continue; } @@ -1058,13 +1058,13 @@ int main(int argc, char *argv[]) { const Game *g = findGame(buffer, size); if (!g) { warning("skipping unknown file '%s'", argv[i]); - delete [] buffer; + delete[] buffer; continue; } if (!hasNeededEntries(g, &out)) { warning("file '%s' is missing offset entries and thus can't be processed", argv[i]); - delete [] buffer; + delete[] buffer; continue; } @@ -1078,7 +1078,7 @@ int main(int argc, char *argv[]) { // We switch to the second language and continue extraction. if (!hasNeededEntries(++g, &out)) { warning("file '%s' is missing offset entries and thus can't be processed", argv[i]); - delete [] buffer; + delete[] buffer; continue; } if (!process(out, g, buffer, size)) @@ -1090,14 +1090,14 @@ int main(int argc, char *argv[]) { // We switch to the third language and continue extraction. if (!hasNeededEntries(++g, &out)) { warning("file '%s' is missing offset entries and thus can't be processed", argv[i]); - delete [] buffer; + delete[] buffer; continue; } if (!process(out, g, buffer, size)) fprintf(stderr, "ERROR: couldn't process file '%s'", argv[i]); } - delete [] buffer; + delete[] buffer; } if (!out.saveFile(argv[1])) diff --git a/tools/create_kyradat/pak.cpp b/tools/create_kyradat/pak.cpp index f3446df291..0187168c0f 100644 --- a/tools/create_kyradat/pak.cpp +++ b/tools/create_kyradat/pak.cpp @@ -78,7 +78,7 @@ bool PAKFile::loadFile(const char *file, const bool isAmiga) { startoffset = endoffset; } - delete [] buffer; + delete[] buffer; return true; } |