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

XMLTagHandler.cpp has fewer dependencies...

... freeing three files from dependency cycles
This commit is contained in:
Paul Licameli 2019-05-12 15:53:01 -04:00
parent 7fc3adb54d
commit 191cd23b54
3 changed files with 12 additions and 9 deletions

View File

@ -213,12 +213,11 @@ class AUDACITY_DLL_API Track /* not final */
public:
enum ChannelType
{
LeftChannel = 0,
RightChannel = 1,
MonoChannel = 2
};
using ChannelType = XMLValueChecker::ChannelType;
static const auto LeftChannel = XMLValueChecker::LeftChannel;
static const auto RightChannel = XMLValueChecker::RightChannel;
static const auto MonoChannel = XMLValueChecker::MonoChannel;
TrackId GetId() const { return mId; }
private:

View File

@ -33,8 +33,6 @@
#include <wx/arrstr.h>
#include <wx/filename.h>
#include "../Track.h"
// Length check. Is in part about not supplying malicious strings to file functions.
bool XMLValueChecker::IsGoodString(const wxString & str)
{
@ -168,7 +166,7 @@ bool XMLValueChecker::IsGoodInt64(const wxString & strInt)
bool XMLValueChecker::IsValidChannel(const int nValue)
{
return (nValue >= Track::LeftChannel) && (nValue <= Track::MonoChannel);
return (nValue >= LeftChannel) && (nValue <= MonoChannel);
}
#ifdef USE_MIDI

View File

@ -63,6 +63,12 @@ public:
static bool IsGoodInt64(const wxString & strInt);
static bool IsGoodIntForRange(const wxString & strInt, const wxString & strMAXABS);
enum ChannelType
{
LeftChannel = 0,
RightChannel = 1,
MonoChannel = 2
};
static bool IsValidChannel(const int nValue);
#ifdef USE_MIDI
static bool IsValidVisibleChannels(const int nValue);