Skip to content

Commit df0704d

Browse files
author
D. A. Pellegrino
committed
241 Removed mismatched new/delete as identified by Intel compiler. Deletes now match corresponding new.
1 parent 9033f31 commit df0704d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

libcds/src/static/sequence/wt_coder_huff.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace cds_static
7676
uint *buffer = new uint[maxBuffer];
7777
hc->encode(symbol, buffer, (size_t)0);
7878
bool ret = bitget(buffer,l);
79-
delete buffer;
79+
delete[] buffer;
8080
return ret;
8181
}
8282

@@ -89,7 +89,7 @@ namespace cds_static
8989
uint *buffer = new uint[maxBuffer];
9090
uint s_len = (uint)hc->encode(symbol, buffer, (size_t)0);
9191
bool ret = l==s_len;
92-
delete buffer;
92+
delete[] buffer;
9393
return ret;
9494
}
9595

libhdt/src/sequence/HuffmanSequence.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void HuffmanSequence::load(std::istream & input)
8787
for(size_t i=0;i<numElements;i++) {
8888
pos = huffman->decode(&vectorPlain[i], encV, pos);
8989
}
90-
delete encV;
90+
delete[] encV;
9191
}
9292

9393
size_t HuffmanSequence::load(const unsigned char *ptr, const unsigned char *ptrMax, ProgressListener *listener)

0 commit comments

Comments
 (0)