1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-04 14:19:30 +02:00

Shuttle and ShuttleParams class hierarchies are separate...

... despite the name similarities, there was no commonality of purpose.

We can use multiple inheritance from the two, treating each as a mixin, if
need arises.
This commit is contained in:
Paul Licameli 2019-02-05 15:45:49 -05:00
parent 0c24d0d47a
commit 4c3140ae05
2 changed files with 2 additions and 7 deletions

View File

@ -306,11 +306,6 @@ bool ShuttleCli::ExchangeWithMaster(const wxString & Name)
} }
bool ShuttleParams::ExchangeWithMaster(const wxString & WXUNUSED(Name))
{
return true;
}
#ifdef _MSC_VER #ifdef _MSC_VER
// If this is compiled with MSVC (Visual Studio) // If this is compiled with MSVC (Visual Studio)
#pragma warning( push ) #pragma warning( push )

View File

@ -55,8 +55,9 @@ class CommandParameters;
/**************************************************************************//** /**************************************************************************//**
\brief Shuttle that deals with parameters. This is a base class with lots of \brief Shuttle that deals with parameters. This is a base class with lots of
virtual functions that do nothing by default. virtual functions that do nothing by default.
Unrelated to class Shuttle.
********************************************************************************/ ********************************************************************************/
class ShuttleParams /* not final */ : public Shuttle class ShuttleParams /* not final */
{ {
public: public:
wxString mParams; wxString mParams;
@ -64,7 +65,6 @@ public:
CommandParameters * mpEap; CommandParameters * mpEap;
ShuttleParams() { mpEap = NULL; pOptionalFlag = NULL; } ShuttleParams() { mpEap = NULL; pOptionalFlag = NULL; }
virtual ~ShuttleParams() {} virtual ~ShuttleParams() {}
bool ExchangeWithMaster(const wxString & Name) override;
bool ShouldSet(); bool ShouldSet();
virtual ShuttleParams & Optional( bool & WXUNUSED(var) ){ pOptionalFlag = NULL;return *this;}; virtual ShuttleParams & Optional( bool & WXUNUSED(var) ){ pOptionalFlag = NULL;return *this;};
virtual ShuttleParams & OptionalY( bool & var ){ return Optional( var );}; virtual ShuttleParams & OptionalY( bool & var ){ return Optional( var );};