diff options
author | Aki <please@ignore.pl> | 2022-03-27 17:42:26 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-27 17:42:26 +0200 |
commit | a12e588079700d55a0b788fea2df7727c2e41f52 (patch) | |
tree | 690072569624c73af5043b3619acaab4d298b1fa /Stars45/Archive.cpp | |
parent | 72bb517271dad40a440533ad0796a88247011199 (diff) | |
download | starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.zip starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.tar.gz starshatter-a12e588079700d55a0b788fea2df7727c2e41f52.tar.bz2 |
Removed MemDebug from FoundationEx
Diffstat (limited to 'Stars45/Archive.cpp')
-rw-r--r-- | Stars45/Archive.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/Stars45/Archive.cpp b/Stars45/Archive.cpp index 258452d..9d859c2 100644 --- a/Stars45/Archive.cpp +++ b/Stars45/Archive.cpp @@ -7,7 +7,6 @@ */ -#include "MemDebug.h" #include "Types.h" #include "Archive.h" #include "Utils.h" @@ -57,7 +56,7 @@ void DataArchive::WriteEntry(int index, BYTE* buf) if (f != -1) { header.dir_size_comp = DirBlocks() * BLOCK_SIZE; - dirbuf = new(__FILE__,__LINE__) BYTE[header.dir_size_comp]; + dirbuf = new BYTE[header.dir_size_comp]; if (!dirbuf) { err = Z_MEM_ERROR; @@ -134,7 +133,7 @@ void DataArchive::CreateBlockMap() } nblocks = max_usage/BLOCK_SIZE; - block_map = new(__FILE__,__LINE__) DWORD[nblocks]; + block_map = new DWORD[nblocks]; if (!block_map) { nblocks = 0; @@ -207,8 +206,8 @@ void DataArchive::LoadDatafile(const char* name) DWORD len = DirBlocks() * BLOCK_SIZE; DWORD dirsize = header.nfiles + 64; - dirbuf = new(__FILE__,__LINE__) BYTE[len]; - directory = new(__FILE__,__LINE__) DataEntry[dirsize]; + dirbuf = new BYTE[len]; + directory = new DataEntry[dirsize]; if (!dirbuf || !directory) { err = Z_MEM_ERROR; @@ -291,7 +290,7 @@ BYTE* DataArchive::CompressEntry(int i) DWORD len = ftell(f); fseek(f, 0, SEEK_SET); - BYTE* buf = new(__FILE__,__LINE__) BYTE[len]; + BYTE* buf = new BYTE[len]; if (!buf) { err = Z_MEM_ERROR; @@ -304,7 +303,7 @@ BYTE* DataArchive::CompressEntry(int i) directory[i].size_orig = len; directory[i].size_comp = (int) (len * 1.1); - BYTE* cbuf = new(__FILE__,__LINE__) BYTE[directory[i].size_comp]; + BYTE* cbuf = new BYTE[directory[i].size_comp]; if (!cbuf) { err = Z_MEM_ERROR; @@ -335,7 +334,7 @@ int DataArchive::ExpandEntry(int i, BYTE*& buf, bool null_terminate) if (f) { DWORD clen = directory[i].size_comp; - BYTE* cbuf = new(__FILE__,__LINE__) BYTE[clen]; + BYTE* cbuf = new BYTE[clen]; if (!cbuf) { err = Z_MEM_ERROR; @@ -348,12 +347,12 @@ int DataArchive::ExpandEntry(int i, BYTE*& buf, bool null_terminate) len = directory[i].size_orig; if (null_terminate) { - buf = new(__FILE__,__LINE__) BYTE[len+1]; + buf = new BYTE[len+1]; if (buf) buf[len] = 0; } else { - buf = new(__FILE__,__LINE__) BYTE[len]; + buf = new BYTE[len]; } if (!buf) { @@ -409,7 +408,7 @@ int DataArchive::InsertEntry(const char* name) } } - DataEntry* dir = new(__FILE__,__LINE__) DataEntry[dirsize + 64]; + DataEntry* dir = new DataEntry[dirsize + 64]; if (directory && dirsize) { ZeroMemory(dir, (dirsize + 64) * sizeof(DataEntry)); |