1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

I got fed up of unused parameter warning from my compiler hiding the warnings I wanted to see, so have added WXUNUSED annotations to a lot of widely used header files, and cleaned up trailing junk on the way.

This commit is contained in:
richardash1981 2012-12-31 16:57:15 +00:00
parent 389beeb7fc
commit 72f6eded20
15 changed files with 31 additions and 139 deletions

View File

@ -104,8 +104,8 @@ class DirManager: public XMLTagHandler {
void SetLoadingBlockLength(sampleCount len) { mLoadingBlockLen = len; } void SetLoadingBlockLength(sampleCount len) { mLoadingBlockLen = len; }
void SetMaxSamples(sampleCount max) { mMaxSamples = max; } void SetMaxSamples(sampleCount max) { mMaxSamples = max; }
bool HandleXMLTag(const wxChar *tag, const wxChar **attrs); bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
XMLTagHandler *HandleXMLChild(const wxChar *tag) { return NULL; } XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) { return NULL; }
void WriteXML(XMLWriter &xmlFile) { wxASSERT(false); }; // This class only reads tags. void WriteXML(XMLWriter & WXUNUSED(xmlFile)) { wxASSERT(false); }; // This class only reads tags.
bool AssignFile(wxFileName &filename,wxString value,bool check); bool AssignFile(wxFileName &filename,wxString value,bool check);
// Clean the temp dir. Note that now where we have auto recovery the temp // Clean the temp dir. Note that now where we have auto recovery the temp

View File

@ -65,7 +65,7 @@ public:
return false; return false;
} }
XMLTagHandler *HandleXMLChild(const wxChar *tag) XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag))
{ {
return NULL; return NULL;
} }

View File

@ -106,7 +106,7 @@ class ImportXMLTagHandler : public XMLTagHandler
ImportXMLTagHandler(AudacityProject* pProject) { mProject = pProject; }; ImportXMLTagHandler(AudacityProject* pProject) { mProject = pProject; };
virtual bool HandleXMLTag(const wxChar *tag, const wxChar **attrs); virtual bool HandleXMLTag(const wxChar *tag, const wxChar **attrs);
virtual XMLTagHandler *HandleXMLChild(const wxChar *tag) { return NULL; }; virtual XMLTagHandler *HandleXMLChild(const wxChar * WXUNUSED(tag)) { return NULL; };
// Don't want a WriteXML method because ImportXMLTagHandler is not a WaveTrack. // Don't want a WriteXML method because ImportXMLTagHandler is not a WaveTrack.
// <import> tags are instead written by AudacityProject::WriteXML. // <import> tags are instead written by AudacityProject::WriteXML.

View File

@ -51,7 +51,7 @@ class Resample
/// tradeoff between speed and quality. This lets you query /// tradeoff between speed and quality. This lets you query
/// the various methods available. /// the various methods available.
static int GetNumMethods() { return 1; }; static int GetNumMethods() { return 1; };
static wxString GetMethodName(int index) { return _("Resampling disabled."); }; static wxString GetMethodName(int WXUNUSED(index)) { return _("Resampling disabled."); };
/// Audacity identifies two methods out of all of the choices: /// Audacity identifies two methods out of all of the choices:
/// a Fast method intended for real-time audio I/O, and a Best /// a Fast method intended for real-time audio I/O, and a Best
@ -91,11 +91,11 @@ class Resample
@param outBufferLen How big outBuffer is. @param outBufferLen How big outBuffer is.
@return Number of output samples created by this call @return Number of output samples created by this call
*/ */
virtual int Process(double factor, virtual int Process(double WXUNUSED(factor),
float *inBuffer, float *inBuffer,
int inBufferLen, int inBufferLen,
bool lastFlag, bool WXUNUSED(lastFlag),
int *inBufferUsed, int * WXUNUSED(inBufferUsed),
float *outBuffer, float *outBuffer,
int outBufferLen) int outBufferLen)
{ {

View File

@ -157,17 +157,17 @@ class AUDACITY_DLL_API Track: public XMLTagHandler
// separate from the Track. // separate from the Track.
DirManager* GetDirManager() const { return mDirManager; } DirManager* GetDirManager() const { return mDirManager; }
virtual bool Cut (double t0, double t1, Track ** dest) {return false;} virtual bool Cut (double WXUNUSED(t0), double WXUNUSED(t1), Track ** WXUNUSED(dest)) {return false;}
virtual bool Copy (double t0, double t1, Track ** dest) {return false;} virtual bool Copy (double WXUNUSED(t0), double WXUNUSED(t1), Track ** WXUNUSED(dest)) {return false;}
virtual bool Clear(double t0, double t1) {return false;} virtual bool Clear(double WXUNUSED(t0), double WXUNUSED(t1)) {return false;}
virtual bool Paste(double t, Track * src) {return false;} virtual bool Paste(double WXUNUSED(t), Track * WXUNUSED(src)) {return false;}
// This can be used to adjust a sync-lock selected track when the selection // This can be used to adjust a sync-lock selected track when the selection
// is replaced by one of a different length. // is replaced by one of a different length.
virtual bool SyncLockAdjust(double oldT1, double newT1); virtual bool SyncLockAdjust(double oldT1, double newT1);
virtual bool Silence(double t0, double t1) {return false;} virtual bool Silence(double WXUNUSED(t0), double WXUNUSED(t1)) {return false;}
virtual bool InsertSilence(double t, double len) {return false;} virtual bool InsertSilence(double WXUNUSED(t), double WXUNUSED(len)) {return false;}
virtual int GetKind() const { return None; } virtual int GetKind() const { return None; }
@ -446,15 +446,3 @@ class AUDACITY_DLL_API TrackFactory
}; };
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 2214d773-8e6c-4117-a03d-36c9722ace52

View File

@ -35,7 +35,7 @@ class DeviceToolBar:public ToolBar {
void DeinitChildren(); void DeinitChildren();
virtual void Populate(); virtual void Populate();
virtual void Repaint(wxDC *dc) {}; virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons(); virtual void EnableDisableButtons();
virtual bool Layout(); virtual bool Layout();
void OnFocus(wxFocusEvent &event); void OnFocus(wxFocusEvent &event);
@ -83,14 +83,3 @@ class DeviceToolBar:public ToolBar {
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 3acba542-52ae-44eb-b0b3-e0645587b5c0

View File

@ -66,7 +66,7 @@ class EditToolBar:public ToolBar {
void OnButton(wxCommandEvent & event); void OnButton(wxCommandEvent & event);
void Populate(); void Populate();
void Repaint(wxDC *dc) {}; void Repaint(wxDC * WXUNUSED(dc)) {};
void EnableDisableButtons(); void EnableDisableButtons();
void UpdatePrefs(); void UpdatePrefs();
@ -95,14 +95,3 @@ class EditToolBar:public ToolBar {
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: b06d2006-b412-41e0-90fe-fa8330420e0d

View File

@ -34,7 +34,7 @@ class MeterToolBar:public ToolBar {
bool DestroyChildren(); bool DestroyChildren();
virtual void Populate(); virtual void Populate();
virtual void Repaint(wxDC *dc) {}; virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons() {}; virtual void EnableDisableButtons() {};
virtual void UpdatePrefs(); virtual void UpdatePrefs();
@ -63,13 +63,3 @@ class MeterToolBar:public ToolBar {
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 5a2a21f8-6c9e-45a4-8718-c26cad5cfe65

View File

@ -36,7 +36,7 @@ class MixerToolBar:public ToolBar {
void SetMixer(wxCommandEvent &event); void SetMixer(wxCommandEvent &event);
virtual void Populate(); virtual void Populate();
virtual void Repaint(wxDC *dc) {}; virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons() {}; virtual void EnableDisableButtons() {};
void OnFocus(wxFocusEvent &event); void OnFocus(wxFocusEvent &event);
@ -69,14 +69,3 @@ class MixerToolBar:public ToolBar {
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 3acba542-52ae-44eb-b0b3-e0645587b5c0

View File

@ -48,7 +48,7 @@ class SelectionBar:public ToolBar {
void Create(wxWindow *parent); void Create(wxWindow *parent);
virtual void Populate(); virtual void Populate();
virtual void Repaint(wxDC *dc) {}; virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons() {}; virtual void EnableDisableButtons() {};
virtual void UpdatePrefs(); virtual void UpdatePrefs();
@ -107,14 +107,3 @@ class SelectionBar:public ToolBar {
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 441b2b59-b3aa-4d30-bed2-7377cef491ab

View File

@ -66,7 +66,7 @@ class ToolsToolBar:public ToolBar {
const wxChar * GetMessageForTool( int ToolNumber ); const wxChar * GetMessageForTool( int ToolNumber );
void Populate(); void Populate();
virtual void Repaint(wxDC *dc) {}; virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons() {}; virtual void EnableDisableButtons() {};
private: private:
@ -87,13 +87,3 @@ class ToolsToolBar:public ToolBar {
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: bb2858b8-2c70-48df-9d72-bcdef94be4e3

View File

@ -82,7 +82,7 @@ class TranscriptionToolBar:public ToolBar {
virtual void OnSensitivitySlider(wxCommandEvent & event); virtual void OnSensitivitySlider(wxCommandEvent & event);
virtual void Populate(); virtual void Populate();
virtual void Repaint(wxDC *dc) {}; virtual void Repaint(wxDC * WXUNUSED(dc)) {};
virtual void EnableDisableButtons(); virtual void EnableDisableButtons();
virtual void UpdatePrefs(); virtual void UpdatePrefs();
@ -136,14 +136,3 @@ class TranscriptionToolBar:public ToolBar {
#define COMMAND_LINE_LOG_TRACE TRUE #define COMMAND_LINE_LOG_TRACE TRUE
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: ToDo

View File

@ -151,7 +151,7 @@ public:
{ {
w->GetEventHandler()->Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(FocusHandler::OnKillFocus)); w->GetEventHandler()->Disconnect(wxEVT_KILL_FOCUS, wxFocusEventHandler(FocusHandler::OnKillFocus));
}; };
void OnKillFocus(wxFocusEvent &event) void OnKillFocus(wxFocusEvent & WXUNUSED(event))
{ {
return; return;
}; };
@ -306,13 +306,3 @@ class GridAx
#endif #endif
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 94f72c32-970b-4f4e-bbf3-3880fce7b965

View File

@ -1523,12 +1523,12 @@ RulerPanel::~RulerPanel()
{ {
} }
void RulerPanel::OnErase(wxEraseEvent &evt) void RulerPanel::OnErase(wxEraseEvent & WXUNUSED(evt))
{ {
// Ignore it to prevent flashing // Ignore it to prevent flashing
} }
void RulerPanel::OnPaint(wxPaintEvent &evt) void RulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
{ {
wxPaintDC dc(this); wxPaintDC dc(this);
@ -1540,7 +1540,7 @@ void RulerPanel::OnPaint(wxPaintEvent &evt)
ruler.Draw(dc); ruler.Draw(dc);
} }
void RulerPanel::OnSize(wxSizeEvent &evt) void RulerPanel::OnSize(wxSizeEvent & WXUNUSED(evt))
{ {
Refresh(false); Refresh(false);
} }
@ -1622,12 +1622,12 @@ AdornedRulerPanel::~AdornedRulerPanel()
delete mBuffer; delete mBuffer;
} }
void AdornedRulerPanel::OnErase(wxEraseEvent &evt) void AdornedRulerPanel::OnErase(wxEraseEvent & WXUNUSED(evt))
{ {
// Ignore it to prevent flashing // Ignore it to prevent flashing
} }
void AdornedRulerPanel::OnPaint(wxPaintEvent &evt) void AdornedRulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt))
{ {
#if defined(__WXMAC__) #if defined(__WXMAC__)
wxPaintDC dc(this); wxPaintDC dc(this);
@ -1657,7 +1657,7 @@ void AdornedRulerPanel::OnPaint(wxPaintEvent &evt)
DoDrawPlayRegion(&dc); DoDrawPlayRegion(&dc);
} }
void AdornedRulerPanel::OnSize(wxSizeEvent &evt) void AdornedRulerPanel::OnSize(wxSizeEvent & WXUNUSED(evt))
{ {
mOuter = GetClientRect(); mOuter = GetClientRect();
@ -1812,7 +1812,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
} }
} }
void AdornedRulerPanel::OnCaptureLost(wxMouseCaptureLostEvent &evt) void AdornedRulerPanel::OnCaptureLost(wxMouseCaptureLostEvent & WXUNUSED(evt))
{ {
wxMouseEvent e(wxEVT_LEFT_UP); wxMouseEvent e(wxEVT_LEFT_UP);
e.m_x = mLastMouseX; e.m_x = mLastMouseX;

View File

@ -66,12 +66,12 @@ class AUDACITY_DLL_API XMLTagHandler {
// This method will be called when a closing tag is encountered. // This method will be called when a closing tag is encountered.
// It is optional to override this method. // It is optional to override this method.
virtual void HandleXMLEndTag(const wxChar *tag) {} virtual void HandleXMLEndTag(const wxChar * WXUNUSED(tag)) {}
// This method will be called when element content has been // This method will be called when element content has been
// encountered. // encountered.
// It is optional to override this method. // It is optional to override this method.
virtual void HandleXMLContent(const wxString & content) {} virtual void HandleXMLContent(const wxString & WXUNUSED(content)) {}
// If the XML document has children of your tag, this method // If the XML document has children of your tag, this method
// should be called. Typically you should construct a new // should be called. Typically you should construct a new
@ -90,14 +90,3 @@ class AUDACITY_DLL_API XMLTagHandler {
#endif // define __AUDACITY_XML_TAG_HANDLER__ #endif // define __AUDACITY_XML_TAG_HANDLER__
// Indentation settings for Vim and Emacs and unique identifier for Arch, a
// version control system. Please do not modify past this point.
//
// Local Variables:
// c-basic-offset: 3
// indent-tabs-mode: nil
// End:
//
// vim: et sts=3 sw=3
// arch-tag: 7c9a9baa-c546-42de-afaa-d87e5e13bf5a