"delete"->"DELETE" in comments, easier to find remaining naked operator delete

This commit is contained in:
Paul Licameli 2016-02-14 18:50:45 -05:00
parent 6706b19af8
commit 56e7653343
56 changed files with 111 additions and 111 deletions

View File

@ -19,7 +19,7 @@ and grids used by Audacity.
This will be split up into separate include files to reduce the amount
of recompilation on a change.
Meantime, do NOT delete any of these declarations, even if they're
Meantime, do NOT DELETE any of these declarations, even if they're
unused, as they're all offset by prior declarations.
To add an image, you give its size and name like so:

View File

@ -313,7 +313,7 @@ void QuitAudacity(bool bForce)
//temporarilly commented out till it is added to all projects
//delete Profiler::Instance();
//delete the static lock for audacity projects
//DELETE the static lock for audacity projects
AudacityProject::DeleteAllProjectsDeleteLock();
//remove our logger

View File

@ -1721,7 +1721,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
mPlaybackBuffers = new RingBuffer* [mPlaybackTracks->GetCount()];
mPlaybackMixers = new Mixer* [mPlaybackTracks->GetCount()];
// Set everything to zero in case we have to delete these due to a memory exception.
// Set everything to zero in case we have to DELETE these due to a memory exception.
memset(mPlaybackBuffers, 0, sizeof(RingBuffer*)*mPlaybackTracks->GetCount());
memset(mPlaybackMixers, 0, sizeof(Mixer*)*mPlaybackTracks->GetCount());
@ -1764,7 +1764,7 @@ int AudioIO::StartStream(WaveTrackArray playbackTracks,
mResample = new Resample* [mCaptureTracks->GetCount()];
mFactor = sampleRate / mRate;
// Set everything to zero in case we have to delete these due to a memory exception.
// Set everything to zero in case we have to DELETE these due to a memory exception.
memset(mCaptureBuffers, 0, sizeof(RingBuffer*)*mCaptureTracks->GetCount());
memset(mResample, 0, sizeof(Resample*)*mCaptureTracks->GetCount());

View File

@ -758,12 +758,12 @@ bool AutoSaveFile::Decode(const wxString & fileName)
try
{
out.Open(tempName, wxT("wb"));
opened = out.IsOpened();
out.Open(tempName, wxT("wb"));
opened = out.IsOpened();
}
catch (XMLFileWriterException* pException)
{
delete pException;
delete pException;
}
if (!opened)

View File

@ -193,7 +193,7 @@ void BlockFile::Deinit()
/// This method also has the side effect of setting the mMin, mMax,
/// and mRMS members of this class.
///
/// You must not delete the returned buffer; it is static to this
/// You must not DELETE the returned buffer; it is static to this
/// method.
///
/// @param buffer A buffer containing the sample data to be analyzed

View File

@ -265,7 +265,7 @@ static int RecursivelyRemoveEmptyDirs(wxString dirPath,
// Have to recheck dir.HasSubDirs() again, in case they all were deleted in recursive calls.
if (!dir.HasSubDirs() && !dir.HasFiles() && (dirPath.Right(5) != wxT("_data")))
{
// No subdirs or files. It's empty so delete it.
// No subdirs or files. It's empty so DELETE it.
// Vaughan, 2010-07-07:
// Note that, per http://src.chromium.org/svn/trunk/src/base/file_util_win.cc, among others,
// "Some versions of Windows return ERROR_FILE_NOT_FOUND (0x2) when deleting
@ -371,7 +371,7 @@ DirManager::DirManager()
DirManager::~DirManager()
{
wxASSERT(mRef == 0); // MM: Otherwise, we shouldn't delete it
wxASSERT(mRef == 0); // MM: Otherwise, we shouldn't DELETE it
numDirManagers--;
if (numDirManagers == 0) {
@ -389,7 +389,7 @@ void DirManager::CleanTempDir()
wxArrayString filePathArray;
// Subtract 1 because we don't want to delete the global temp directory,
// Subtract 1 because we don't want to DELETE the global temp directory,
// which this will find and list last.
int count =
RecursivelyEnumerate(globaltemp, filePathArray, wxT("project*"), true, true) - 1;
@ -727,7 +727,7 @@ void DirManager::BalanceInfoDel(wxString file)
// back if its needed (unlike the dirTopPool hash)
dirMidPool.erase(midkey);
// delete the actual directory
// DELETE the actual directory
wxString dir=(projFull != wxT("")? projFull: mytemp);
dir += wxFILE_SEP_PATH;
dir += file.Mid(0,3);
@ -747,7 +747,7 @@ void DirManager::BalanceInfoDel(wxString file)
}else{
if(--dirTopPool[topnum]<1){
// do *not* erase the hash entry from dirTopPool
// *do* delete the actual directory
// *do* DELETE the actual directory
wxString dir=(projFull != wxT("")? projFull: mytemp);
dir += wxFILE_SEP_PATH;
dir += file.Mid(0,3);
@ -1072,7 +1072,7 @@ bool DirManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
(pBlockFile->GetLength() > mMaxSamples))
{
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=451#c13.
// Lock pBlockFile so that the ~BlockFile() will not delete the file on disk.
// Lock pBlockFile so that the ~BlockFile() will not DELETE the file on disk.
pBlockFile->Lock();
delete pBlockFile;
return false;
@ -1082,15 +1082,15 @@ bool DirManager::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
//
// If the block we loaded is already in the hash table, then the
// object we just loaded is a duplicate, so we delete it and
// object we just loaded is a duplicate, so we DELETE it and
// return a reference to the existing object instead.
//
wxString name = target->GetFileName().GetName();
BlockFile *retrieved = mBlockFileHash[name];
if (retrieved) {
// Lock it in order to delete it safely, i.e. without having
// it delete the file, too...
// Lock it in order to DELETE it safely, i.e. without having
// it DELETE the file, too...
target->Lock();
delete target;
@ -1358,7 +1358,7 @@ void DirManager::Deref()
--mRef;
// MM: Automatically delete if refcount reaches zero
// MM: Automatically DELETE if refcount reaches zero
if (mRef == 0)
delete this;
}
@ -1376,7 +1376,7 @@ int DirManager::ProjectFSCK(const bool bForceError, const bool bAutoRecoverMode)
// all done in sequence, then the user was prompted for each type of error.
// The enumerations are now interleaved with prompting, because, for example,
// user choosing to replace missing aliased block files with silence
// needs to put in SilentBlockFiles and delete the corresponding auf files,
// needs to put in SilentBlockFiles and DELETE the corresponding auf files,
// so those would then not be cumulated in missingAUFHash.
// We still do the FindX methods outside the conditionals,
// so the log always shows all found errors.
@ -1656,7 +1656,7 @@ other projects. \
ProgressDialog* pProgress =
new ProgressDialog(_("Progress"),
_("Cleaning up unused directories in project data"));
// nDirCount is for updating pProgress. +1 because we may delete dirPath.
// nDirCount is for updating pProgress. +1 because we may DELETE dirPath.
int nDirCount = RecursivelyCountSubdirs(dirPath) + 1;
RecursivelyRemoveEmptyDirs(dirPath, nDirCount, pProgress);
delete pProgress;

View File

@ -156,7 +156,7 @@ class DirManager: public XMLTagHandler {
// This should only be used by the auto save functionality
void SetLocalTempDir(wxString path);
// Do not delete any temporary files on exit. This is only called if
// Do not DELETE any temporary files on exit. This is only called if
// auto recovery is cancelled and should be retried later
static void SetDontDeleteTempFiles() { dontDeleteTempFiles = true; }

View File

@ -489,7 +489,7 @@ void Envelope::MoveDraggedPoint( wxMouseEvent & event, wxRect & r,
// We no longer tolerate multiple envelope points at the same t.
// epsilon is less than the time offset of a single sample
// TODO: However because mTrackEpsilon assumes 200KHz this use
// of epsilon is a tad bogus. What we need to do instead is delete
// of epsilon is a tad bogus. What we need to do instead is DELETE
// a duplicated point on a mouse up.
double newWhen = zoomInfo.PositionToTime(event.m_x, r.x) - mOffset;

View File

@ -171,7 +171,7 @@ class Envelope : public XMLTagHandler {
* Returns 0 if point moved, -1 if not found.*/
int Move(double when, double value);
/** \brief delete a point by its position in array */
/** \brief DELETE a point by its position in array */
void Delete(int point);
/** \brief insert a point */

View File

@ -151,7 +151,7 @@ LabelDialog::LabelDialog(wxWindow *parent,
/* i18n-hint: (noun) of a label*/
mGrid->SetColLabelValue(3,_("End Time"));
// Create and remember editors. No need to delete these as the wxGrid will
// Create and remember editors. No need to DELETE these as the wxGrid will
// do it for us.
mChoiceEditor = (ChoiceEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_CHOICE);
mTimeEditor = (TimeEditor *) mGrid->GetDefaultEditorForType(GRID_VALUE_TIME);

View File

@ -1701,13 +1701,13 @@ bool LabelTrack::OnKeyDown(SelectedRegion &newSel, wxKeyEvent & event)
//IF the label is not blank THEN get rid of a letter or letters according to cursor position
if (len > 0)
{
// IF there are some highlighted letters, THEN delete them
// IF there are some highlighted letters, THEN DELETE them
if (mLabels[mSelIndex]->highlighted) {
RemoveSelectedText();
}
else
{
// delete one letter
// DELETE one letter
if (mCurrentCursorPos > 0) {
mLabels[mSelIndex]->title.Remove(mCurrentCursorPos-1, 1);
mCurrentCursorPos--;
@ -1716,7 +1716,7 @@ bool LabelTrack::OnKeyDown(SelectedRegion &newSel, wxKeyEvent & event)
}
else
{
// ELSE no text in text box, so delete whole label.
// ELSE no text in text box, so DELETE whole label.
DeleteLabel( mSelIndex );
}
mInitialCursorPos = mCurrentCursorPos;
@ -1732,13 +1732,13 @@ bool LabelTrack::OnKeyDown(SelectedRegion &newSel, wxKeyEvent & event)
//If the label is not blank get rid of a letter according to cursor position
if (len > 0)
{
// if there are some highlighted letters, delete them
// if there are some highlighted letters, DELETE them
if (mLabels[mSelIndex]->highlighted) {
RemoveSelectedText();
}
else
{
// delete one letter
// DELETE one letter
if (mCurrentCursorPos < len) {
mLabels[mSelIndex]->title.Remove(mCurrentCursorPos, 1);
}
@ -1746,7 +1746,7 @@ bool LabelTrack::OnKeyDown(SelectedRegion &newSel, wxKeyEvent & event)
}
else
{
// delete whole label if no text in text box
// DELETE whole label if no text in text box
DeleteLabel( mSelIndex );
}
mInitialCursorPos = mCurrentCursorPos;
@ -2085,7 +2085,7 @@ void LabelTrack::OnContextMenu(wxCommandEvent & evt)
}
break;
/// delete selected label
/// DELETE selected label
case OnDeleteSelectedLabelID:
int ndx = GetLabelIndex(p->GetSel0(), p->GetSel1());
if (ndx != -1)

View File

@ -79,7 +79,7 @@ public:
/// Returns relationship between a region described and this label; if
/// parent is set, it will consider point labels at the very beginning
/// and end of parent to be within a region that borders them (this makes
/// it possible to delete capture all labels with a Select All).
/// it possible to DELETE capture all labels with a Select All).
TimeRelations RegionRelation(double reg_t0, double reg_t1,
LabelTrack *parent = NULL);

View File

@ -491,7 +491,7 @@ void AudacityProject::CreateMenusAndCommands()
c->BeginSubMenu(_("R&emove Special"));
/* i18n-hint: (verb) Do a special kind of cut*/
c->AddItem(wxT("SplitCut"), _("Spl&it Cut"), FN(OnSplitCut), wxT("Ctrl+Alt+X"));
/* i18n-hint: (verb) Do a special kind of delete*/
/* i18n-hint: (verb) Do a special kind of DELETE*/
c->AddItem(wxT("SplitDelete"), _("Split D&elete"), FN(OnSplitDelete), wxT("Ctrl+Alt+K"));
c->AddSeparator();
@ -4653,9 +4653,9 @@ void AudacityProject::OnSplitDeleteLabels()
EditByLabel( &WaveTrack::SplitDelete, false );
PushState(
/* i18n-hint: (verb) Audacity has just done a special kind of delete on the labeled audio regions */
/* i18n-hint: (verb) Audacity has just done a special kind of DELETE on the labeled audio regions */
_( "Split Deleted labeled audio regions" ),
/* i18n-hint: (verb) Do a special kind of delete on labeled audio regions*/
/* i18n-hint: (verb) Do a special kind of DELETE on labeled audio regions*/
_( "Split Delete Labeled Audio" ) );
RedrawProject();

View File

@ -42,7 +42,7 @@
#include "TimeTrack.h"
#include "float_cast.h"
//TODO-MB: wouldn't it make more sense to delete the time track after 'mix and render'?
//TODO-MB: wouldn't it make more sense to DELETE the time track after 'mix and render'?
bool MixAndRender(TrackList *tracks, TrackFactory *trackFactory,
double rate, sampleFormat format,
double startTime, double endTime,

View File

@ -1132,7 +1132,7 @@ void MixerBoard::UpdateTrackClusters()
// This can happen only on things like Undo New Audio Track or Undo Import
// that don't call RemoveTrackCluster explicitly.
// We've already updated the track pointers for the clusters to the left, so just remove all the rest.
// Keep nClusterIndex constant and successively delete from left to right.
// Keep nClusterIndex constant and successively DELETE from left to right.
for (unsigned int nCounter = nClusterIndex; nCounter < nClusterCount; nCounter++)
#ifdef EXPERIMENTAL_MIDI_OUT
this->RemoveTrackCluster(mMixerTrackClusters[nClusterIndex]->mTrack);
@ -1204,7 +1204,7 @@ void MixerBoard::RemoveTrackCluster(const WaveTrack* pTrack)
return; // Couldn't find it.
mMixerTrackClusters.RemoveAt(nIndex);
pMixerTrackCluster->Destroy(); // delete is unsafe on wxWindow.
pMixerTrackCluster->Destroy(); // DELETE is unsafe on wxWindow.
// Close the gap, if any.
wxPoint pos;

View File

@ -495,7 +495,7 @@ void ModuleManager::UnloadModule(ModuleInterface *module)
mLibs.erase(module);
}
delete module; //After terminating and unloading, we can safely delete the module
delete module; //After terminating and unloading, we can safely DELETE the module
}
}

View File

@ -499,7 +499,7 @@ bool NoteTrack::Trim(double t0, double t1)
if (t1 <= t0)
return false;
mSeq->convert_to_seconds();
// delete way beyond duration just in case something is out there:
// DELETE way beyond duration just in case something is out there:
mSeq->clear(t1 - GetOffset(), mSeq->get_dur() + 10000.0, false);
// Now that stuff beyond selection is cleared, clear before selection:
mSeq->clear(0.0, t0 - GetOffset(), false);
@ -842,7 +842,7 @@ void NoteTrack::WriteXML(XMLWriter &xmlFile)
xmlFile.WriteAttr(wxT("data"), wxString(data.str().c_str(), wxConvUTF8));
xmlFile.EndTag(wxT("notetrack"));
if (this != saveme) {
delete saveme; // delete the duplicate
delete saveme; // DELETE the duplicate
}
}

View File

@ -55,7 +55,7 @@ Profiler::~Profiler()
fclose(log);
//delete everything.
//DELETE everything.
for(int i=0;i<(int)mTasks.size();i++)
delete mTasks[i];
}

View File

@ -2145,7 +2145,7 @@ void AudacityProject::OnMouseEvent(wxMouseEvent & event)
// LL: All objects that have a reference to the DirManager should
// be deleted before the final mDirManager->Deref() in this
// routine. Failing to do so can cause unwanted recursion
// and/or attempts to delete objects twice.
// and/or attempts to DELETE objects twice.
void AudacityProject::OnCloseWindow(wxCloseEvent & event)
{
// We are called for the wxEVT_CLOSE_WINDOW, wxEVT_END_SESSION, and
@ -2253,7 +2253,7 @@ void AudacityProject::OnCloseWindow(wxCloseEvent & event)
quitOnClose = !mMenuClose;
#endif
// DanH: If we're definitely about to quit, delete the clipboard.
// DanH: If we're definitely about to quit, DELETE the clipboard.
// Doing this after Deref'ing the DirManager causes problems.
if ((gAudacityProjects.GetCount() == 1) && (quitOnClose || gIsQuitting))
DeleteClipboard();
@ -2264,8 +2264,8 @@ void AudacityProject::OnCloseWindow(wxCloseEvent & event)
// SetMenuBar(NULL);
// Lock all blocks in all tracks of the last saved version, so that
// the blockfiles aren't deleted on disk when we delete the blockfiles
// in memory. After it's locked, delete the data structure so that
// the blockfiles aren't deleted on disk when we DELETE the blockfiles
// in memory. After it's locked, DELETE the data structure so that
// there's no memory leak.
if (mLastSavedTracks) {
TrackListIterator iter(mLastSavedTracks);
@ -2332,7 +2332,7 @@ void AudacityProject::OnCloseWindow(wxCloseEvent & event)
// references to the DirManager.
mUndoManager.ClearStates();
// MM: Tell the DirManager it can now delete itself
// MM: Tell the DirManager it can now DELETE itself
// if it finds it is no longer needed. If it is still
// used (f.e. by the clipboard), it will recognize this
// and will destroy itself later.
@ -2800,7 +2800,7 @@ void AudacityProject::OpenFile(wxString fileName, bool addtohistory)
if (mIsRecovered)
{
// This project has been recovered, so write a new auto-save file
// now and then delete the old one in the auto-save folder. Note that
// now and then DELETE the old one in the auto-save folder. Note that
// at this point mFileName != fileName, because when opening a
// recovered file mFileName is faked to point to the original file
// which has been recovered, not the one in the auto-save folder.
@ -3533,7 +3533,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
delete pException;
// When XMLWriter throws an exception, it tries to close it before,
// so we can at least try to delete the incomplete file and move the
// so we can at least try to DELETE the incomplete file and move the
// backup file over.
if (safetyFileName != wxT(""))
{
@ -3548,14 +3548,14 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
mWantSaveCompressed = false; // Don't want this mode for AudacityProject::WriteXML() any more.
else
{
// Now that we have saved the file, we can delete the auto-saved version
// Now that we have saved the file, we can DELETE the auto-saved version
DeleteCurrentAutoSaveFile();
if (mIsRecovered)
{
// This was a recovered file, that is, we have just overwritten the
// old, crashed .aup file. There may still be orphaned blockfiles in
// this directory left over from the crash, so we delete them now
// this directory left over from the crash, so we DELETE them now
mDirManager->RemoveOrphanBlockfiles();
// Before we saved this, this was a recovered project, but now it is
@ -3595,7 +3595,7 @@ bool AudacityProject::Save(bool overwrite /* = true */ ,
mUndoManager.StateSaved();
}
// If we get here, saving the project was successful, so we can delete
// If we get here, saving the project was successful, so we can DELETE
// the .bak file (because it now does not fit our block files anymore
// anyway).
if (safetyFileName != wxT(""))
@ -3916,7 +3916,7 @@ For an audio file that will open in other apps, use 'Export'.\n"),
// JKC: I removed 'wxFD_OVERWRITE_PROMPT' because we are checking
// for overwrite ourselves later, and we disallow it.
// We disallow overwrite because we would have to delete the many
// We disallow overwrite because we would have to DELETE the many
// smaller files too, or prompt to move them.
wxString fName = FileSelector(sDialogTitle,
filename.GetPath(),
@ -4781,7 +4781,7 @@ void AudacityProject::AutoSave()
return;
}
// Now that we have a new auto-save file, delete the old one
// Now that we have a new auto-save file, DELETE the old one
DeleteCurrentAutoSaveFile();
if (!mAutoSaveFileName.IsEmpty())

View File

@ -482,7 +482,7 @@ public:
// Command Handling
bool TryToMakeActionAllowed( wxUint32 & flags, wxUint32 flagsRqd, wxUint32 mask );
///Prevents delete from external thread - for e.g. use of GetActiveProject
///Prevents DELETE from external thread - for e.g. use of GetActiveProject
static void AllProjectsDeleteLock();
static void AllProjectsDeleteUnlock();

View File

@ -1628,7 +1628,7 @@ bool Sequence::Delete(sampleCount start, sampleCount len)
int sampleSize = SAMPLE_SIZE(mSampleFormat);
// Special case: if the samples to delete are all within a single
// Special case: if the samples to DELETE are all within a single
// block and the resulting length is not too small, perform the
// deletion within this block:
SeqBlock *pBlock;
@ -1717,7 +1717,7 @@ bool Sequence::Delete(sampleCount start, sampleCount len)
mDirManager->Deref(preBlock.f);
}
// Next, delete blocks strictly between b0 and b1
// Next, DELETE blocks strictly between b0 and b1
for (i = b0 + 1; i < b1; i++) {
mDirManager->Deref(mBlock[i].f);
}

View File

@ -10,7 +10,7 @@
the entire track hierarchy. The UndoManager makes a duplicate
of every single track using its Duplicate method, which should
increment reference counts. If we were not at the top of
the stack when this is called, delete above first.
the stack when this is called, DELETE above first.
If a minor change is made, for example changing the visual
display of a track or changing the selection, you can call

View File

@ -1539,7 +1539,7 @@ bool WaveClip::Clear(double t0, double t1)
double cutlinePosition = mOffset + clip->GetOffset();
if (cutlinePosition >= t0 && cutlinePosition <= t1)
{
// This cutline is within the area, delete it
// This cutline is within the area, DELETE it
delete clip;
mCutLines.DeleteNode(it);
} else

View File

@ -339,7 +339,7 @@ public:
double* cutLineStart = NULL,
double *cutLineEnd = NULL);
/** Expand cut line (that is, re-insert audio, then delete audio saved in
/** Expand cut line (that is, re-insert audio, then DELETE audio saved in
* cut line). Returns true if a cut line could be found and sucessfully
* expanded, false otherwise */
bool ExpandCutLine(double cutLinePosition);

View File

@ -609,7 +609,7 @@ bool WaveTrack::Trim (double t0, double t1)
}
//if inside0 is false, then the left selector was between
//clips, so delete everything to its left.
//clips, so DELETE everything to its left.
if(false == inside1)
{
if (!Clear(t1,GetEndTime()))
@ -974,7 +974,7 @@ bool WaveTrack::ClearAndPaste(double t0, // Start of time to clear
for (int ii = cuts.GetCount(); ii--;)
delete cuts[ii];
// If we created a default time warper, we need to delete it
// If we created a default time warper, we need to DELETE it
if (effectWarper == NULL)
delete warper;
@ -1080,7 +1080,7 @@ bool WaveTrack::HandleClear(double t0, double t1,
}
}
else { // (We are not doing a split cut)
/* We are going to delete part of the clip here. The clip may
/* We are going to DELETE part of the clip here. The clip may
* have envelope points, and we need to ensure that the envelope
* outside of the cleared region is not affected. This means
* putting in "glue" points where the clip enters and leaves the
@ -1445,7 +1445,7 @@ bool WaveTrack::Disjoin(double t0, double t1)
endTime = t1;
//simply look for a sequence of zeroes and if the sequence
//is greater than minimum number, split-delete the region
//is greater than minimum number, split-DELETE the region
sampleCount seqStart = -1;
sampleCount start, end;
@ -1527,7 +1527,7 @@ bool WaveTrack::Join(double t0, double t1)
}
}
//if there are no clips to delete, nothing to do
//if there are no clips to DELETE, nothing to do
if( clipsToDelete.GetCount() == 0 )
return true;
@ -2499,7 +2499,7 @@ void WaveTrack::UpdateLocationsCache()
wxASSERT(curpos == mDisplayNumLocations);
}
// Expand cut line (that is, re-insert audio, then delete audio saved in cut line)
// Expand cut line (that is, re-insert audio, then DELETE audio saved in cut line)
bool WaveTrack::ExpandCutLine(double cutLinePosition, double* cutlineStart,
double* cutlineEnd)
{

View File

@ -379,7 +379,7 @@ class AUDACITY_DLL_API WaveTrack : public Track {
int GetNumCachedLocations() { return mDisplayNumLocations; }
Location GetCachedLocation(int index) { return mDisplayLocations[index]; }
// Expand cut line (that is, re-insert audio, then delete audio saved in cut line)
// Expand cut line (that is, re-insert audio, then DELETE audio saved in cut line)
bool ExpandCutLine(double cutLinePosition, double* cutlineStart = NULL, double* cutlineEnd = NULL);
// Remove cut line, without expanding the audio in it
@ -522,7 +522,7 @@ public:
// Uses fillZero always
// Returns null on failure
// Returned pointer may be invalidated if Get is called again
// Do not delete[] the pointer
// Do not DELETE[] the pointer
constSamplePtr Get(sampleFormat format, sampleCount start, sampleCount len);
private:

View File

@ -385,7 +385,7 @@ wxFileName ODDecodeBlockFile::GetFileName()
/// This method also has the side effect of setting the mMin, mMax,
/// and mRMS members of this class.
///
/// Unlike BlockFile's implementation You SHOULD delete the returned buffer.
/// Unlike BlockFile's implementation You SHOULD DELETE the returned buffer.
/// this is protected so it shouldn't be hard to deal with - just override
/// all BlockFile methods that use this method.
///

View File

@ -452,7 +452,7 @@ void ODPCMAliasBlockFile::WriteSummary()
/// This method also has the side effect of setting the mMin, mMax,
/// and mRMS members of this class.
///
/// Unlike BlockFile's implementation You SHOULD delete the returned buffer.
/// Unlike BlockFile's implementation You SHOULD DELETE the returned buffer.
/// this is protected so it shouldn't be hard to deal with - just override
/// all BlockFile methods that use this method.
///

View File

@ -49,7 +49,7 @@ public:
/// Get a pointer to the singleton instance
static CommandDirectory *Get();
/// Manually delete the singleton instance
/// Manually DELETE the singleton instance
static void Destroy();
};

View File

@ -53,7 +53,7 @@ void CommandHandler::OnReceiveCommand(AppCommandEvent &event)
// different project.
cmd->Apply(*mCurrentContext);
// Done with the command so delete it.
// Done with the command so DELETE it.
delete cmd;
// Redraw the project

View File

@ -420,7 +420,7 @@ void CommandManager::PurgeData()
for(i=0; i<mCommandList.GetCount(); i++)
{
CommandListEntry *tmpEntry = mCommandList[i];
// JKC: We only want to delete each callbacks once.
// JKC: We only want to DELETE each callbacks once.
// AddItemList() may have inserted the same callback
// several times over.
if( tmpEntry->callback != pCallback )

View File

@ -38,7 +38,7 @@ public:
// Add a parameter to the signature.
// name: the parameter name (case-sensitive)
// dft: a default value
// valid: a suitable validator (caller doesn't need to delete it)
// valid: a suitable validator (caller doesn't need to DELETE it)
void AddParameter(const wxString &name,
const wxVariant &dft,
Validator *valid);

View File

@ -2124,14 +2124,14 @@ void Effect::AddToOutputTracks(Track *t)
}
// If bGoodResult, replace mTracks tracks with successfully processed mOutputTracks copies.
// Else clear and delete mOutputTracks copies.
// Else clear and DELETE mOutputTracks copies.
void Effect::ReplaceProcessedTracks(const bool bGoodResult)
{
wxASSERT(mOutputTracks != NULL); // Make sure we at least did the CopyInputTracks().
if (!bGoodResult) {
// Processing failed or was cancelled so throw away the processed tracks.
mOutputTracks->Clear(true); // true => delete the tracks
mOutputTracks->Clear(true); // true => DELETE the tracks
// Reset map
mIMap.Clear();
@ -2161,7 +2161,7 @@ void Effect::ReplaceProcessedTracks(const bool bGoodResult)
// This should never happen
wxASSERT(i < cnt);
// Remove the track from the output list...don't delete it
// Remove the track from the output list...don't DELETE it
x = iterOut.RemoveCurrent(false);
Track *t = (Track *) mIMap[i];
@ -2599,7 +2599,7 @@ void Effect::Preview(bool dryOnly)
delete mOutputTracks;
mOutputTracks = NULL;
mTracks->Clear(true); // true => delete the tracks
mTracks->Clear(true); // true => DELETE the tracks
delete mTracks;
mTracks = saveTracks;

View File

@ -349,7 +349,7 @@ protected:
// If bGoodResult, replace mWaveTracks tracks in mTracks with successfully processed
// mOutputTracks copies, get rid of old mWaveTracks, and set mWaveTracks to mOutputTracks.
// Else clear and delete mOutputTracks copies.
// Else clear and DELETE mOutputTracks copies.
void ReplaceProcessedTracks(const bool bGoodResult);
// Use this to append a new output track.

View File

@ -53,7 +53,7 @@ EffectManager::~EffectManager()
{
#if defined(EXPERIMENTAL_EFFECTS_RACK)
// wxWidgets has already destroyed the rack since it was derived from wxFrame. So
// no need to delete it here.
// no need to DELETE it here.
#endif
EffectMap::iterator iter = mHostEffects.begin();

View File

@ -3287,7 +3287,7 @@ void EditCurvesDialog::OnDelete(wxCommandEvent & WXUNUSED(event))
PopulateList(mEditCurves.GetCount()-1); // set 'unnamed' as the selected curve
else
PopulateList(highlight); // user said 'No' to deletion
#else // 'delete all N' code
#else // 'DELETE all N' code
int count = mList->GetSelectedItemCount();
long item = mList->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
// Create the prompt

View File

@ -1020,7 +1020,7 @@ void EffectNoiseReduction::Worker::FinishTrack
// were input.
// Well, not exactly, but not more than one step-size of extra samples
// at the end.
// We'll delete them later in ProcessOne.
// We'll DELETE them later in ProcessOne.
FloatVector empty(mStepSize);

View File

@ -446,7 +446,7 @@ void EffectNoiseRemoval::FinishTrack()
// windows until we've output exactly as many samples as
// were input.
// Well, not exactly, but not more than mWindowSize/2 extra samples at the end.
// We'll delete them later in ProcessOne.
// We'll DELETE them later in ProcessOne.
float *empty = new float[mWindowSize / 2];
int i;

View File

@ -70,7 +70,7 @@ int EffectStereoToMono::GetAudioOutCount()
bool EffectStereoToMono::Process()
{
// Do not use mWaveTracks here. We will possibly delete tracks,
// Do not use mWaveTracks here. We will possibly DELETE tracks,
// so we must use the "real" tracklist.
this->CopyInputTracks(); // Set up mOutputTracks.
bool bGoodResult = true;

View File

@ -310,16 +310,16 @@ void Importer::WriteImportItems()
gPrefs->Write (name, val);
gPrefs->Flush();
}
/* If we used to have more items than we have now, delete the excess items.
/* If we used to have more items than we have now, DELETE the excess items.
We just keep deleting items and incrementing until we find there aren't any
more to delete.*/
more to DELETE.*/
i = this->mExtImportItems->Count();
do {
name.Printf (wxT("/ExtImportItems/Item%d"), (int)i);
// No item to delete? Then it's time to finish.
// No item to DELETE? Then it's time to finish.
if (!gPrefs->Read(name, &val))
break;
// Failure to delete probably means a read-only config file.
// Failure to DELETE probably means a read-only config file.
// no point continuing.
// TODO: Possibly report (once).
if( !gPrefs->DeleteEntry (name, false))

View File

@ -603,7 +603,7 @@ int FFmpegImportFileHandle::Import(TrackFactory *trackFactory,
}
tasks.push_back(odTask);
}
//Now we add the tasks and let them run, or delete them if the user cancelled
//Now we add the tasks and let them run, or DELETE them if the user cancelled
for(int i=0; i < (int)tasks.size(); i++) {
if(res==eProgressSuccess)
ODManager::Instance()->AddNewTask(tasks[i]);

View File

@ -348,7 +348,7 @@ bool FLACImportFileHandle::Init()
ODFlacDecoder* odDecoder = (ODFlacDecoder*)mDecoderTask->CreateFileDecoder(mFilename);
if(!odDecoder || !odDecoder->ReadHeader())
{
//delete the task only if it failed to read - otherwise the OD man takes care of it.
//DELETE the task only if it failed to read - otherwise the OD man takes care of it.
delete mDecoderTask;
return false;
}
@ -550,7 +550,7 @@ int FLACImportFileHandle::Import(TrackFactory *trackFactory,
FLACImportFileHandle::~FLACImportFileHandle()
{
//don't delete mFile if we are using OD.
//don't DELETE mFile if we are using OD.
#ifndef EXPERIMENTAL_OD_FLAC
mFile->finish();
delete mFile;

View File

@ -237,7 +237,7 @@ int MP3ImportFileHandle::Import(TrackFactory *trackFactory, Track ***outTracks,
/* failure */
/* printf("failure\n"); */
/* delete everything */
/* DELETE everything */
for (chn = 0; chn < mPrivateData.numChannels; chn++) {
delete mPrivateData.channels[chn];
}

View File

@ -256,7 +256,7 @@ mStreamIndex(streamIndex)
//ODDecodeBlockFiles that point to FFmpeg files.
}
//we have taken ownership, so delete the ffmpeg stuff allocated in ImportFFmpeg that was given to us.
//we have taken ownership, so DELETE the ffmpeg stuff allocated in ImportFFmpeg that was given to us.
ODFFmpegDecoder::~ODFFmpegDecoder()
{
if (FFmpegLibsInst->ValidLibsLoaded())
@ -274,7 +274,7 @@ ODFFmpegDecoder::~ODFFmpegDecoder()
}
free(mScs);
//delete our caches.
//DELETE our caches.
while(mDecodeCache.size())
{
free(mDecodeCache[0]->samplePtr);

View File

@ -18,7 +18,7 @@ from. For any type there should only be one ODDecodeTask associated with
a given track.
There could be the ODBlockFiles of several FLACs in one track (after copy and pasting),
so things aren't as simple as they seem - the implementation needs to be
robust enough to allow all the user changes such as copy/paste, delete, and so on.
robust enough to allow all the user changes such as copy/paste, DELETE, and so on.
*//*******************************************************************/

View File

@ -18,7 +18,7 @@ from. For any type there should only be one ODDecodeTask associated with
a given track.
There could be the ODBlockFiles of several FLACs in one track (after copy and pasting),
so things aren't as simple as they seem - the implementation needs to be
robust enough to allow all the user changes such as copy/paste, delete, and so on.
robust enough to allow all the user changes such as copy/paste, DELETE, and so on.
*//*******************************************************************/

View File

@ -72,7 +72,7 @@ ODManager::ODManager()
mQueueNotEmptyCond = new ODCondition(&mQueueNotEmptyCondLock);
}
//private destructor - delete with static method Quit()
//private destructor - DELETE with static method Quit()
ODManager::~ODManager()
{
//get rid of all the queues. The queues get rid of the tasks, so we don't worry abut them.
@ -361,7 +361,7 @@ void ODManager::Quit()
pMan->mTerminate = true;
pMan->mTerminateMutex.Unlock();
//This while loop waits for ODTasks to finish and the delete removes all tasks from the Queue.
//This while loop waits for ODTasks to finish and the DELETE removes all tasks from the Queue.
//This function is called from the main audacity event thread, so there should not be more requests for pMan
pMan->mTerminatedMutex.Lock();
while(!pMan->mTerminated)
@ -431,7 +431,7 @@ void ODManager::MakeWaveTrackIndependent(WaveTrack* track)
bool ODManager::MakeWaveTrackDependent(WaveTrack* dependentTrack,WaveTrack* masterTrack)
{
//First, check to see if the task lists are mergeable. If so, we can simply add this track to the other task and queue,
//then delete this one.
//then DELETE this one.
ODWaveTrackTaskQueue* masterQueue=NULL;
ODWaveTrackTaskQueue* dependentQueue=NULL;
unsigned int dependentIndex = 0;
@ -494,7 +494,7 @@ void ODManager::UpdateQueues()
{
if(mQueues[i]->IsFrontTaskComplete())
{
//this should delete and remove the front task instance.
//this should DELETE and remove the front task instance.
mQueues[i]->RemoveFrontTask();
//schedule next.
if(!mQueues[i]->IsEmpty())
@ -508,7 +508,7 @@ void ODManager::UpdateQueues()
}
}
//if the queue is empty delete it.
//if the queue is empty DELETE it.
if(mQueues[i]->IsEmpty())
{
delete mQueues[i];

View File

@ -118,7 +118,7 @@ class ODManager
protected:
//private constructor - Singleton.
ODManager();
//private constructor - delete with static method Quit()
//private constructor - DELETE with static method Quit()
virtual ~ODManager();
///Launches a thread for the manager and starts accepting Tasks.
void Init();

View File

@ -26,7 +26,7 @@ ODWaveTrackTaskQueue::ODWaveTrackTaskQueue()
ODWaveTrackTaskQueue::~ODWaveTrackTaskQueue()
{
//we need to delete all ODTasks. We will have to block or wait until block for the active ones.
//we need to DELETE all ODTasks. We will have to block or wait until block for the active ones.
for(unsigned int i=0;i<mTasks.size();i++)
{
mTasks[i]->TerminateAndBlock();//blocks if active.

View File

@ -1131,7 +1131,7 @@ void ControlToolBar::ClearCutPreviewTracks()
{
if (mCutPreviewTracks)
{
mCutPreviewTracks->Clear(true); /* delete track contents too */
mCutPreviewTracks->Clear(true); /* DELETE track contents too */
delete mCutPreviewTracks;
mCutPreviewTracks = NULL;
}

View File

@ -529,7 +529,7 @@ void ToolManager::Reset()
// when we dock, we reparent, so bar is no longer a child of floater.
dock->Dock( bar );
Expose( ndx, expose );
//OK (and good) to delete floater, as bar is no longer in it.
//OK (and good) to DELETE floater, as bar is no longer in it.
if( floater )
floater->Destroy();
}

View File

@ -239,7 +239,7 @@ class LWSlider
wxBitmap *mThumbBitmap;
// AD: True if this object owns *mThumbBitmap (sometimes mThumbBitmap points
// to an object we shouldn't delete) -- once we get theming totally right
// to an object we shouldn't DELETE) -- once we get theming totally right
// this should go away
bool mThumbBitmapAllocated;

View File

@ -212,7 +212,7 @@ class ToolBarArea : public wxPanel
void CollapseAll(bool now = false);
// Does not add or delete the window, just relates to layout...
// Does not add or DELETE the window, just relates to layout...
void AddChild(ExpandingToolBar *child);
void RemoveChild(ExpandingToolBar *child);

View File

@ -1544,7 +1544,7 @@ void Ruler::SetCustomMajorLabels(wxArrayString *label, int numLabel, int start,
mMajorLabels[i].text = label->Item(i);
mMajorLabels[i].pos = start + i*step;
}
//Remember: delete majorlabels....
//Remember: DELETE majorlabels....
}
void Ruler::SetCustomMinorLabels(wxArrayString *label, int numLabel, int start, int step)
@ -1558,7 +1558,7 @@ void Ruler::SetCustomMinorLabels(wxArrayString *label, int numLabel, int start,
mMinorLabels[i].text = label->Item(i);
mMinorLabels[i].pos = start + i*step;
}
//Remember: delete majorlabels....
//Remember: DELETE majorlabels....
}
void Ruler::Label::Draw(wxDC&dc, bool twoTone) const

View File

@ -320,7 +320,7 @@ private:
void DoDrawCursor(wxDC * dc);
void DoDrawSelection(wxDC * dc);
void DoDrawIndicator(wxDC * dc);
void DrawQuickPlayIndicator(wxDC * dc /*NULL to delete old only*/);
void DrawQuickPlayIndicator(wxDC * dc /*NULL to DELETE old only*/);
void DoDrawPlayRegion(wxDC * dc);
double Pos2Time(int p, bool ignoreFisheye = false);

View File

@ -309,7 +309,7 @@ IntegerValidatorBase::IsCharOk(const wxString& val, int pos, wxChar ch) const
// we're limited to -5..15 range and the current value is 12, then the
// new value would be (invalid) -12. We consider it better to let the
// user do this because perhaps he is going to press Delete key next to
// make it -2 and forcing him to delete 1 first would be unnatural.
// make it -2 and forcing him to DELETE 1 first would be unnatural.
//
// TODO: It would be nice to indicate that the current control contents
// is invalid (if it's indeed going to be the case) once