diff options
author | Johannes Schickel | 2008-05-07 14:31:45 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-05-07 14:31:45 +0000 |
commit | 600ab40bcab24d3c1c8d98d3fefefa6026f03382 (patch) | |
tree | 37d052c958cb62aa947bc97c651d2d49a240f81f /tools/create_kyradat | |
parent | f65e9a17c34daeaa93b7de99b639cddcc6997abe (diff) | |
download | scummvm-rg350-600ab40bcab24d3c1c8d98d3fefefa6026f03382.tar.gz scummvm-rg350-600ab40bcab24d3c1c8d98d3fefefa6026f03382.tar.bz2 scummvm-rg350-600ab40bcab24d3c1c8d98d3fefefa6026f03382.zip |
Changed all delete [] usages to delete[].
svn-id: r31927
Diffstat (limited to 'tools/create_kyradat')
-rw-r--r-- | tools/create_kyradat/create_kyradat.cpp | 20 | ||||
-rw-r--r-- | tools/create_kyradat/pak.cpp | 2 |
2 files changed, 11 insertions, 11 deletions
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; } |