1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-16 17:41:14 +01:00

Harmlessly qualify classes as final (or explicitly comment not)...

... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
This commit is contained in:
Paul Licameli
2016-02-24 01:06:39 -05:00
parent e2f7e5f6f6
commit 7824e94030
261 changed files with 480 additions and 472 deletions

View File

@@ -26,7 +26,7 @@ class ODPCMAliasBlockFile;
class WaveTrack;
/// A class representing a modular task to be used with the On-Demand structures.
class ODComputeSummaryTask:public ODTask
class ODComputeSummaryTask final : public ODTask
{
public:

View File

@@ -52,7 +52,7 @@ typedef struct _FFmpegDecodeCache
//------ ODFFmpegDecoder declaration and defs - here because we strip dependencies from .h files
///class to decode a particular file (one per file). Saves info such as filename and length (after the header is read.)
class ODFFmpegDecoder:public ODFileDecoder
class ODFFmpegDecoder final : public ODFileDecoder
{

View File

@@ -23,7 +23,7 @@
class ODFileDecoder;
class WaveTrack;
/// A class representing a modular task to be used with the On-Demand structures.
class ODDecodeFFmpegTask:public ODDecodeTask
class ODDecodeFFmpegTask final : public ODDecodeTask
{
public:

View File

@@ -42,7 +42,7 @@ class ODFlacDecoder;
class ODFLACFile;
/// A class representing a modular task to be used with the On-Demand structures.
class ODDecodeFlacTask:public ODDecodeTask
class ODDecodeFlacTask final : public ODDecodeTask
{
public:
@@ -61,7 +61,7 @@ class ODDecodeFlacTask:public ODDecodeTask
};
class ODFLACFile : public FLAC::Decoder::File
class ODFLACFile final : public FLAC::Decoder::File
{
public:
ODFLACFile(ODFlacDecoder *decoder) : mDecoder(decoder)
@@ -91,7 +91,7 @@ class ODFLACFile : public FLAC::Decoder::File
///class to decode a particular file (one per file). Saves info such as filename and length (after the header is read.)
class ODFlacDecoder:public ODFileDecoder
class ODFlacDecoder final : public ODFileDecoder
{
friend class ODFLACFile;
public:

View File

@@ -37,7 +37,7 @@ class ODFileDecoder;
/// A class representing a modular task to be used with the On-Demand structures.
class ODDecodeTask:public ODTask
class ODDecodeTask /* not final */ : public ODTask
{
public:
ODDecodeTask();
@@ -96,7 +96,7 @@ protected:
};
///class to decode a particular file (one per file). Saves info such as filename and length (after the header is read.)
class ODFileDecoder
class ODFileDecoder /* not final */
{
public:
///This should handle unicode converted to UTF-8 on mac/linux, but OD TODO:check on windows

View File

@@ -40,7 +40,7 @@ int CompareNoCaseFileName(const wxString& first, const wxString& second);
/// number of threads.
class WaveTrack;
class ODWaveTrackTaskQueue;
class ODManager
class ODManager final
{
public:
///Gets the singleton instance - this is a function pointer that points to one of the below two instance calls.
@@ -212,7 +212,7 @@ class ODManagerHelperThread {
int mPriority;
};
#else
class ODManagerHelperThread : public wxThread
class ODManagerHelperThread final : public wxThread
{
public:
///Constructs a ODTaskThread

View File

@@ -35,7 +35,7 @@ class WaveTrack;
DECLARE_EXPORTED_EVENT_TYPE(AUDACITY_DLL_API, EVT_ODTASK_COMPLETE, -1)
/// A class representing a modular task to be used with the On-Demand structures.
class ODTask
class ODTask /* not final */
{
public:
enum {

View File

@@ -125,7 +125,7 @@ protected:
#else
class ODTaskThread : public wxThread
class ODTaskThread final : public wxThread
{
public:
///Constructs a ODTaskThread
@@ -142,7 +142,7 @@ protected:
//a wrapper for wxMutex.
class AUDACITY_DLL_API ODLock : public wxMutex
class AUDACITY_DLL_API ODLock final : public wxMutex
{
public:
///Constructs a ODTaskThread
@@ -151,7 +151,7 @@ public:
virtual ~ODLock(){}
};
class ODCondition : public wxCondition
class ODCondition final : public wxCondition
{
public:
ODCondition(ODLock *lock):wxCondition(*lock){}

View File

@@ -28,7 +28,7 @@ tasks associated with a WaveTrack.
class WaveTrack;
class ODTask;
/// A class representing a modular task to be used with the On-Demand structures.
class ODWaveTrackTaskQueue
class ODWaveTrackTaskQueue final
{
public: