mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 15:53:52 +02:00
Remove naked new[] in: tracks
This commit is contained in:
@@ -653,17 +653,17 @@ private:
|
||||
void Free();
|
||||
|
||||
struct Buffer {
|
||||
float *data;
|
||||
Floats data;
|
||||
sampleCount start;
|
||||
sampleCount len;
|
||||
|
||||
Buffer() : data(0), start(0), len(0) {}
|
||||
void Free() { delete[] data; data = 0; start = 0; len = 0; }
|
||||
Buffer() : start(0), len(0) {}
|
||||
void Free() { data.reset(); start = 0; len = 0; }
|
||||
sampleCount end() const { return start + len; }
|
||||
|
||||
void swap ( Buffer &other )
|
||||
{
|
||||
std::swap( data, other.data );
|
||||
data .swap ( other.data );
|
||||
std::swap( start, other.start );
|
||||
std::swap( len, other.len );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user