diff options
author | Carl Hetherington <carl@carlh.net> | 2008-12-18 19:31:00 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2008-12-18 19:31:00 +0000 |
commit | 4e1f451520975868659f4c00d00883f5f1cd5805 (patch) | |
tree | 7a8a51d65d70932e8151bbbeafc8eae49e60cd65 /libs/ardour/sndfilesource.cc | |
parent | be655cc5af1b059de77bb4215c13f14013fc73da (diff) |
Remove unnecessary 0 checks before delete; see http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.8 Apologies for the big commit.
git-svn-id: svn://localhost/ardour2/branches/3.0@4332 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 6a4b5e325d..b35d36a713 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -259,13 +259,8 @@ SndFileSource::~SndFileSource () touch_peakfile (); } - if (_broadcast_info) { - delete _broadcast_info; - } - - if (xfade_buf) { - delete [] xfade_buf; - } + delete _broadcast_info; + delete [] xfade_buf; } float @@ -782,13 +777,8 @@ SndFileSource::setup_standard_crossfades (nframes_t rate) xfade_frames = (nframes_t) floor ((Config->get_destructive_xfade_msecs () / 1000.0) * rate); - if (out_coefficient) { - delete [] out_coefficient; - } - - if (in_coefficient) { - delete [] in_coefficient; - } + delete [] out_coefficient; + delete [] in_coefficient; out_coefficient = new gain_t[xfade_frames]; in_coefficient = new gain_t[xfade_frames]; |