mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Fix some array deletion stuff
This commit is contained in:
parent
9f271c7e79
commit
4a814e23a7
@ -111,7 +111,7 @@ void HighPass(char * data, int samples, float cutoff, float dt)
|
|||||||
for (int i=0; i< samples; ++i) {
|
for (int i=0; i< samples; ++i) {
|
||||||
data[i] = Y[i];
|
data[i] = Y[i];
|
||||||
}
|
}
|
||||||
delete Y;
|
delete [] Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WeinmannLoader::Open(QString path)
|
int WeinmannLoader::Open(QString path)
|
||||||
|
@ -231,7 +231,7 @@ bool compressFile(QString inpath, QString outpath)
|
|||||||
char *buf = new char [size];
|
char *buf = new char [size];
|
||||||
|
|
||||||
if (!f.read(buf, size)) {
|
if (!f.read(buf, size)) {
|
||||||
delete buf;
|
delete [] buf;
|
||||||
qDebug() << "compressFile() Couldn't read all of" << inpath;
|
qDebug() << "compressFile() Couldn't read all of" << inpath;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -242,13 +242,13 @@ bool compressFile(QString inpath, QString outpath)
|
|||||||
//gzbuffer(gz,65536*2);
|
//gzbuffer(gz,65536*2);
|
||||||
if (!gz) {
|
if (!gz) {
|
||||||
qDebug() << "compressFile() Couldn't open" << outpath << "for writing";
|
qDebug() << "compressFile() Couldn't open" << outpath << "for writing";
|
||||||
delete buf;
|
delete [] buf;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gzwrite(gz, buf, size);
|
gzwrite(gz, buf, size);
|
||||||
gzclose(gz);
|
gzclose(gz);
|
||||||
delete buf;
|
delete [] buf;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user