From 2952017541dceac9758cad0834109876e6b37159 Mon Sep 17 00:00:00 2001 From: "RichardAsh1981@gmail.com" Date: Thu, 12 Sep 2013 16:48:55 +0000 Subject: [PATCH] Delete a quantity of unused variables, based on a patch supplied by Campbell Barton --- src/CrossFade.cpp | 8 -------- src/LoadModules.cpp | 2 +- src/Project.cpp | 2 -- src/import/Import.cpp | 5 ----- src/import/RawAudioGuess.cpp | 3 +-- src/widgets/AttachableScrollBar.cpp | 2 -- src/widgets/ExpandingToolBar.cpp | 6 ++---- 7 files changed, 4 insertions(+), 24 deletions(-) diff --git a/src/CrossFade.cpp b/src/CrossFade.cpp index 5af4de19b..f09404a0f 100644 --- a/src/CrossFade.cpp +++ b/src/CrossFade.cpp @@ -75,7 +75,6 @@ bool CrossFader::CrossFadeMix(samplePtr buffer, sampleFormat format, sampleCount //Get a pointer to the sequence in each clip. WaveClip * tmpclip = NULL; - Sequence * tmp = NULL; WaveClipList::compatibility_iterator it; @@ -220,13 +219,6 @@ bool CrossFader::CrossFadeMix(samplePtr buffer, sampleFormat format, sampleCount float *dest = (float *)buffer; vector floatSeq; - //Copy the sequences over to the new vector, casting as you go. - for(int i = 0; i < numclips; i++) - { - float * tmp; - //tmpSequence[i]->GetSamples(tmp,format,0,tmpSequence[i]->GetNumSamples()); - //floatSeq.push_back(tmp); - } int clips = 0; float f; diff --git a/src/LoadModules.cpp b/src/LoadModules.cpp index f76e4f130..e21e068ce 100644 --- a/src/LoadModules.cpp +++ b/src/LoadModules.cpp @@ -239,7 +239,7 @@ void ModuleManager::Initialize(CommandHandler &cmdHandler) #ifdef EXPERIMENTAL_MODULE_PREFS if( !IsAllowedModule( files[i] ) ) // don't try and check the in-date-ness before this as that means loading the module to call it's GetVersionString, which could do anything. -#endif EXPERIMENTAL_MODULE_PREFS +#endif { wxString ShortName = wxFileName( files[i] ).GetName(); wxString msg; diff --git a/src/Project.cpp b/src/Project.cpp index 75365b45f..df59a7aa0 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -1478,9 +1478,7 @@ void AudacityProject::UpdateFirstVisible() mViewInfo.track = NULL; if (t->GetY() > mViewInfo.vpos) { - Track *l = NULL; while (t && t->GetY() > mViewInfo.vpos) { - l = t; t = mTracks->GetPrev(t); } } diff --git a/src/import/Import.cpp b/src/import/Import.cpp index b02d36a16..e162a510d 100644 --- a/src/import/Import.cpp +++ b/src/import/Import.cpp @@ -352,8 +352,6 @@ int Importer::Import(wxString fName, // First, add user-selected filter bool usersSelectionOverrides; - // False if override filter is not found - bool foundOverride = false; gPrefs->Read(wxT("/ExtendedImport/OverrideExtendedImportByOpenFileDialogChoice"), &usersSelectionOverrides, false); wxLogDebug(wxT("LastOpenType is %s"),type.c_str()); @@ -370,7 +368,6 @@ int Importer::Import(wxString fName, // This plugin corresponds to user-selected filter, try it first. wxLogDebug(wxT("Inserting %s"),plugin->GetPluginStringID().c_str()); importPlugins.Insert(plugin); - foundOverride = true; } importPluginNode = importPluginNode->GetNext(); } @@ -379,7 +376,6 @@ int Importer::Import(wxString fName, wxLogMessage(wxT("File name is %s"),(const char *) fName.mb_str()); wxLogMessage(wxT("Mime type is %s"),(const char *) mime_type.Lower().mb_str()); - bool foundItem = false; for (size_t i = 0; i < mExtImportItems->Count(); i++) { ExtImportItem *item = &(*mExtImportItems)[i]; @@ -431,7 +427,6 @@ int Importer::Import(wxString fName, wxLogDebug(wxT("Inserting %s"),item->filter_objects[j]->GetPluginStringID().c_str()); importPlugins.Append(item->filter_objects[j]); } - foundItem = true; } } diff --git a/src/import/RawAudioGuess.cpp b/src/import/RawAudioGuess.cpp index fcb4effc1..9cda18bbd 100644 --- a/src/import/RawAudioGuess.cpp +++ b/src/import/RawAudioGuess.cpp @@ -77,13 +77,12 @@ static float JumpStat(float *data, int len) static float SecondDStat(float *data, int len) { int i; - float v1=0, v2=0, v3=0; + float v1=0, v2=0; float a1=0, a2=0; float sum=0; for (i = 1; i < len; i++) { a2 = a1; - v3 = v2; v2 = v1; v1 = data[i]-data[i-1]; a1 = v1 - v2; diff --git a/src/widgets/AttachableScrollBar.cpp b/src/widgets/AttachableScrollBar.cpp index 83c2bf555..59c91dc06 100644 --- a/src/widgets/AttachableScrollBar.cpp +++ b/src/widgets/AttachableScrollBar.cpp @@ -74,7 +74,6 @@ void AttachableScrollBar::SetViewInfoFromScrollBar() ViewInfo & mViewInfo = *mpViewInfo; int hlast = mViewInfo.sbarH; - int hoffset = 0; mViewInfo.sbarH = GetThumbPosition(); @@ -85,7 +84,6 @@ void AttachableScrollBar::SetViewInfoFromScrollBar() mViewInfo.h = mViewInfo.total - mViewInfo.screen; if (mViewInfo.h < 0.0) mViewInfo.h = 0.0; - hoffset = (mViewInfo.sbarH - hlast); } } diff --git a/src/widgets/ExpandingToolBar.cpp b/src/widgets/ExpandingToolBar.cpp index b69323d2c..e33b115a3 100644 --- a/src/widgets/ExpandingToolBar.cpp +++ b/src/widgets/ExpandingToolBar.cpp @@ -893,7 +893,6 @@ bool ToolBarArea::ExpandRow(int rowIndex) for(i=0; i<(int)mChildArray.GetCount(); i++) if (mRowArray[i] == rowIndex) { ExpandingToolBar *child = mChildArray[i]; - wxPoint childPos = child->GetPosition(); wxSize childMin = child->GetMinSize(); wxSize childMax = child->GetMaxSize(); @@ -943,17 +942,16 @@ void ToolBarArea::LayoutOne(int childIndex) wxSize area = GetClientSize(); ExpandingToolBar *child = mChildArray[childIndex]; wxSize childMin = child->GetMinSize(); - wxSize childMax = child->GetMaxSize(); if (childIndex == 0) { mRowArray[childIndex] = 0; mChildArray[childIndex]->SetSize(0, 0, childMin.x, childMin.y); ExpandRow(0); + #if 0 wxPoint p = mChildArray[childIndex]->GetPosition(); wxSize s = mChildArray[childIndex]->GetSize(); - #if 0 printf("ToolBar %d moved to row %d at (%d, %d), size (%d x %d)\n", childIndex, mRowArray[childIndex], p.x, p.y, s.x, s.y); @@ -1002,10 +1000,10 @@ void ToolBarArea::LayoutOne(int childIndex) // allowed to redo the layout. mLastLayoutSize = area; + #if 0 wxPoint p = mChildArray[childIndex]->GetPosition(); wxSize s = mChildArray[childIndex]->GetSize(); - #if 0 printf("ToolBar %d moved to row %d at (%d, %d), size (%d x %d)\n", childIndex, mRowArray[childIndex], p.x, p.y, s.x, s.y);