clang-tidy: Apply modernize-use-using everywhere (#6453)

This commit is contained in:
saker
2022-07-07 04:54:34 -04:00
committed by GitHub
parent a6e6afb0ee
commit b451e40b51
77 changed files with 168 additions and 222 deletions

View File

@@ -65,7 +65,7 @@ public:
};
typedef std::vector<DeviceInfo> DeviceInfoCollection;
using DeviceInfoCollection = std::vector<DeviceInfo>;
public:
AudioAlsa( bool & _success_ful, AudioEngine* audioEngine );

View File

@@ -370,7 +370,7 @@ signals:
private:
typedef FifoBuffer<surroundSampleFrame *> Fifo;
using Fifo = FifoBuffer<surroundSampleFrame*>;
class fifoWriter : public QThread
{

View File

@@ -68,13 +68,8 @@ private:
OutputSettings m_outputSettings;
} ;
typedef AudioFileDevice * ( * AudioFileDeviceInstantiaton )
( const QString & outputFilename,
OutputSettings const & outputSettings,
const ch_cnt_t channels,
AudioEngine* audioEngine,
bool & successful );
using AudioFileDeviceInstantiaton
= AudioFileDevice* (*)(const QString&, const OutputSettings&, const ch_cnt_t, AudioEngine*, bool&);
} // namespace lmms

View File

@@ -131,7 +131,7 @@ private:
jack_port_t * ports[2];
} ;
typedef QMap<AudioPort *, StereoPort> JackPortMap;
using JackPortMap = QMap<AudioPort *, StereoPort>;
JackPortMap m_portMap;
#endif

View File

@@ -131,10 +131,10 @@ private:
unsigned long _framesPerBuffer, PaTimestamp _outTime, void * _arg );
typedef double PaTime;
typedef PaDeviceID PaDeviceIndex;
using PaTime = double;
using PaDeviceIndex = PaDeviceID;
typedef struct PaStreamParameters
using PaStreamParameters = struct
{
PaDeviceIndex device;
int channelCount;

View File

@@ -52,7 +52,7 @@ private:
const fpp_t _frames,
const float _master_gain ) override;
typedef QList<QPair<sampleFrame *, fpp_t> > BufferList;
using BufferList = QList<QPair<sampleFrame*, fpp_t>>;
BufferList m_buffers;
} ;

View File

@@ -78,8 +78,7 @@ class LMMS_EXPORT AutomatableModel : public Model, public JournallingObject
Q_OBJECT
MM_OPERATORS
public:
typedef QVector<AutomatableModel *> AutoModelVector;
using AutoModelVector = QVector<AutomatableModel*>;
enum ScaleType
{
@@ -504,8 +503,7 @@ public:
QString displayValue( const float val ) const override;
} ;
typedef QMap<AutomatableModel*, float> AutomatedValueMap;
using AutomatedValueMap = QMap<AutomatableModel*, float>;
} // namespace lmms

View File

@@ -73,7 +73,7 @@ private slots:
} ;
typedef IntModel sliderModel;
using sliderModel = IntModel;
} // namespace lmms::gui

View File

@@ -61,8 +61,8 @@ public:
CubicHermiteProgression
} ;
typedef QMap<int, AutomationNode> timeMap;
typedef QVector<QPointer<AutomatableModel>> objectVector;
using timeMap = QMap<int, AutomationNode>;
using objectVector = QVector<QPointer<AutomatableModel>>;
using TimemapIterator = timeMap::const_iterator;

View File

@@ -99,7 +99,7 @@ public slots:
protected:
typedef AutomationClip::timeMap timeMap;
using timeMap = AutomationClip::timeMap;
void keyPressEvent(QKeyEvent * ke) override;
void leaveEvent(QEvent * e) override;

View File

@@ -54,29 +54,30 @@ const int TLENS[MAXTBL+1] = { 2 << 0, 3 << 0, 2 << 1, 3 << 1,
2 << 8, 3 << 8, 2 << 9, 3 << 9,
2 << 10, 3 << 10, 2 << 11, 3 << 11 };
typedef struct
struct WaveMipMap
{
public:
inline sample_t sampleAt( int table, int ph )
inline sample_t sampleAt(int table, int ph)
{
if( table % 2 == 0 )
{ return m_data[ TLENS[ table ] + ph ]; }
if (table % 2 == 0) { return m_data[TLENS[table] + ph]; }
else
{ return m_data3[ TLENS[ table ] + ph ]; }
{
return m_data3[TLENS[table] + ph];
}
}
inline void setSampleAt( int table, int ph, sample_t sample )
inline void setSampleAt(int table, int ph, sample_t sample)
{
if( table % 2 == 0 )
{ m_data[ TLENS[ table ] + ph ] = sample; }
if (table % 2 == 0) { m_data[TLENS[table] + ph] = sample; }
else
{ m_data3[ TLENS[ table ] + ph ] = sample; }
{
m_data3[TLENS[table] + ph] = sample;
}
}
private:
sample_t m_data [ MIPMAPSIZE ];
sample_t m_data3 [ MIPMAPSIZE3 ];
} WaveMipMap;
sample_t m_data[MIPMAPSIZE];
sample_t m_data3[MIPMAPSIZE3];
};
QDataStream& operator<< ( QDataStream &out, WaveMipMap &waveMipMap );
@@ -166,7 +167,7 @@ public:
static bool s_wavesGenerated;
static WaveMipMap s_waveforms [NumBLWaveforms];
static std::array<WaveMipMap, NumBLWaveforms> s_waveforms;
static QString s_wavetableDir;
};

View File

@@ -138,10 +138,10 @@ private:
double m_a, m_a0, m_a1, m_a2;
double m_b1, m_b2, m_b3, m_b4;
typedef double frame[CHANNELS];
using frame = std::array<double, CHANNELS>;
frame m_z1, m_z2, m_z3, m_z4;
};
typedef LinkwitzRiley<2> StereoLinkwitzRiley;
using StereoLinkwitzRiley = LinkwitzRiley<2>;
template<ch_cnt_t CHANNELS>
class BiQuad
@@ -184,7 +184,7 @@ private:
friend class BasicFilters<CHANNELS>; // needed for subfilter stuff in BasicFilters
};
typedef BiQuad<2> StereoBiQuad;
using StereoBiQuad = BiQuad<2>;
template<ch_cnt_t CHANNELS>
class OnePole
@@ -218,7 +218,7 @@ private:
float m_a0, m_b1;
float m_z1 [CHANNELS];
};
typedef OnePole<2> StereoOnePole;
using StereoOnePole = OnePole<2>;
template<ch_cnt_t CHANNELS>
class BasicFilters
@@ -889,7 +889,7 @@ private:
// coeffs for Lowpass_SV (state-variant lowpass)
float m_svf1, m_svf2, m_svq;
typedef sample_t frame[CHANNELS];
using frame = std::array<sample_t, CHANNELS>;
// in/out history for moog-filter
frame m_y1, m_y2, m_y3, m_y4, m_oldx, m_oldy1, m_oldy2, m_oldy3;

View File

@@ -87,7 +87,7 @@ public:
private:
typedef std::pair<QString, std::unique_ptr<PixmapLoader> > Item;
using Item = std::pair<QString, std::unique_ptr<PixmapLoader>>;
std::vector<Item> m_items;

View File

@@ -303,8 +303,8 @@ private:
unsigned int m_configVersion;
QStringList m_recentlyOpenedProjects;
typedef QVector<QPair<QString, QString> > stringPairVector;
typedef QMap<QString, stringPairVector> settingsMap;
using stringPairVector = QVector<QPair<QString, QString>>;
using settingsMap = QMap<QString, stringPairVector>;
settingsMap m_settings;

View File

@@ -46,9 +46,7 @@ class ControllerDialog;
} // namespace gui
typedef QVector<Controller *> ControllerVector;
using ControllerVector = QVector<Controller*>;
class LMMS_EXPORT Controller : public Model, public JournallingObject
{

View File

@@ -47,8 +47,7 @@ namespace gui
class ControllerConnectionDialog;
}
typedef QVector<ControllerConnection *> ControllerConnectionVector;
using ControllerConnectionVector = QVector<ControllerConnection*>;
class LMMS_EXPORT ControllerConnection : public QObject, public JournallingObject
{

View File

@@ -61,7 +61,7 @@ public:
MidiClip,
TypeCount
} ;
typedef Types Type;
using Type = Types;
DataFile( const QString& fileName );
DataFile( const QByteArray& data );
@@ -136,7 +136,7 @@ private:
static const std::vector<ProjectVersion> UPGRADE_VERSIONS;
// Map with DOM elements that access resources (for making bundles)
typedef std::map<QString, std::vector<QString>> ResourcesMap;
using ResourcesMap = std::map<QString, std::vector<QString>>;
static const ResourcesMap ELEMENTS_WITH_RESOURCES;
void upgrade();

View File

@@ -66,7 +66,7 @@ template<ch_cnt_t CHANNELS>
class CombFeedback
{
public:
typedef double frame[CHANNELS];
using frame = std::array<double, CHANNELS>;
CombFeedback( int maxDelay ) :
m_size( maxDelay ),
@@ -137,7 +137,7 @@ private:
template<ch_cnt_t CHANNELS>
class CombFeedfwd
{
typedef double frame[CHANNELS];
using frame = std::array<double, CHANNELS>;
CombFeedfwd( int maxDelay ) :
m_size( maxDelay ),
@@ -208,7 +208,7 @@ private:
template<ch_cnt_t CHANNELS>
class CombFeedbackDualtap
{
typedef double frame[CHANNELS];
using frame = std::array<double, CHANNELS>;
CombFeedbackDualtap( int maxDelay ) :
m_size( maxDelay ),
@@ -289,7 +289,7 @@ template<ch_cnt_t CHANNELS>
class AllpassDelay
{
public:
typedef double frame[CHANNELS];
using frame = std::array<double, CHANNELS>;
AllpassDelay( int maxDelay ) :
m_size( maxDelay ),
@@ -358,11 +358,10 @@ private:
};
// convenience typedefs for stereo effects
typedef CombFeedback<2> StereoCombFeedback;
typedef CombFeedfwd<2> StereoCombFeedfwd;
typedef CombFeedbackDualtap<2> StereoCombFeedbackDualtap;
typedef AllpassDelay<2> StereoAllpassDelay;
using StereoCombFeedback = CombFeedback<2>;
using StereoCombFeedfwd = CombFeedfwd<2>;
using StereoCombFeedbackDualtap = CombFeedbackDualtap<2>;
using StereoAllpassDelay = AllpassDelay<2>;
} // namespace lmms

View File

@@ -38,7 +38,7 @@ namespace lmms::DspEffectLibrary
class MonoBase
{
public:
typedef class MonoBypass bypassType;
using bypassType = class MonoBypass;
static void process( sample_t * * _buf, const f_cnt_t _frames )
{
@@ -53,7 +53,7 @@ namespace lmms::DspEffectLibrary
class StereoBase
{
public:
typedef class StereoBypass bypassType;
using bypassType = class StereoBypass;
static void process( sample_t * * _buf, const f_cnt_t _frames )
{
@@ -164,7 +164,7 @@ namespace lmms::DspEffectLibrary
class Chain : public FX0::bypassType
{
public:
typedef typename FX0::sample_t sample_t;
using sample_t = typename FX0::sample_t;
Chain( const FX0& fx0, const FX1& fx1 = FX1() ) :
m_FX0( fx0 ),
m_FX1( fx1 )

View File

@@ -236,10 +236,8 @@ private:
} ;
typedef Effect::Descriptor::SubPluginFeatures::Key EffectKey;
typedef Effect::Descriptor::SubPluginFeatures::KeyList EffectKeyList;
using EffectKey = Effect::Descriptor::SubPluginFeatures::Key;
using EffectKeyList = Effect::Descriptor::SubPluginFeatures::KeyList;
} // namespace lmms

View File

@@ -69,7 +69,7 @@ public:
private:
typedef QVector<Effect *> EffectList;
using EffectList = QVector<Effect*>;
EffectList m_effects;
BoolModel m_enabledModel;

View File

@@ -67,7 +67,7 @@ public:
private:
QMutex m_lfoListMutex;
typedef QList<EnvelopeAndLfoParameters *> LfoList;
using LfoList = QList<EnvelopeAndLfoParameters*>;
LfoList m_lfos;
} ;

View File

@@ -54,7 +54,7 @@ public:
static const int MAX_CHORD_POLYPHONY = 13;
private:
typedef int8_t ChordSemiTones [MAX_CHORD_POLYPHONY];
using ChordSemiTones = std::array<int8_t, MAX_CHORD_POLYPHONY>;
public:
InstrumentFunctionNoteStacking( Model * _parent );

View File

@@ -35,30 +35,20 @@ namespace lmms
class LadspaControl;
typedef enum BufferRates
{
enum buffer_rate_t {
CHANNEL_IN,
CHANNEL_OUT,
AUDIO_RATE_INPUT,
AUDIO_RATE_OUTPUT,
CONTROL_RATE_INPUT,
CONTROL_RATE_OUTPUT
} buffer_rate_t;
};
typedef enum BufferData
{
TOGGLED,
ENUM,
INTEGER,
FLOATING,
TIME,
NONE
} buffer_data_t;
enum buffer_data_t { TOGGLED, ENUM, INTEGER, FLOATING, TIME, NONE };
//! This struct is used to hold port descriptions internally
//! which where received from the ladspa plugin
typedef struct PortDescription
struct port_desc_t
{
QString name;
ch_cnt_t proc;
@@ -74,10 +64,9 @@ typedef struct PortDescription
//! This is true iff ladspa suggests logscale
//! Note however that the model can still decide to use a linear scale
bool suggests_logscale;
LADSPA_Data * buffer;
LadspaControl * control;
} port_desc_t;
LADSPA_Data* buffer;
LadspaControl* control;
};
inline Plugin::Descriptor::SubPluginFeatures::Key ladspaKeyToSubPluginKey(
const Plugin::Descriptor * _desc,

View File

@@ -35,8 +35,7 @@
namespace lmms
{
typedef struct PortDescription port_desc_t;
struct port_desc_t;
namespace gui
{

View File

@@ -45,10 +45,10 @@ namespace lmms
const float NOHINT = -99342.2243f;
typedef QPair<QString, QString> ladspa_key_t;
typedef QPair<QString, ladspa_key_t> sortable_plugin_t;
typedef QList<sortable_plugin_t> l_sortable_plugin_t;
typedef QList<ladspa_key_t> l_ladspa_key_t;
using ladspa_key_t = QPair<QString, QString>;
using sortable_plugin_t = QPair<QString, ladspa_key_t>;
using l_sortable_plugin_t = QList<sortable_plugin_t>;
using l_ladspa_key_t = QList<ladspa_key_t>;
/* LadspaManager provides a database of LADSPA plug-ins. Upon instantiation,
it loads all of the plug-ins found in the LADSPA_PATH environmental variable
@@ -73,15 +73,14 @@ enum LadspaPluginType
OTHER
};
typedef struct LadspaManagerStorage
struct LadspaManagerDescription
{
LADSPA_Descriptor_Function descriptorFunction;
uint32_t index;
LadspaPluginType type;
uint16_t inputChannels;
uint16_t outputChannels;
} LadspaManagerDescription;
};
class LMMS_EXPORT LadspaManager
{
@@ -342,8 +341,7 @@ private:
const LADSPA_PortRangeHint* getPortRangeHint( const ladspa_key_t& _plugin,
uint32_t _port );
typedef QMap<ladspa_key_t, LadspaManagerDescription *>
LadspaManagerMapType;
using LadspaManagerMapType = QMap<ladspa_key_t, LadspaManagerDescription*>;
LadspaManagerMapType m_ladspaManagerMap;
l_sortable_plugin_t m_sortedPlugins;

View File

@@ -86,7 +86,7 @@ signals:
} ;
typedef IntModel LcdSpinBoxModel;
using LcdSpinBoxModel = IntModel;
} // namespace lmms::gui

View File

@@ -47,15 +47,16 @@ namespace lmms
/**
An abstract/opaque LV2 event buffer.
*/
typedef struct LV2_Evbuf_Impl LV2_Evbuf;
using LV2_Evbuf = struct LV2_Evbuf_Impl;
/**
An iterator over an LV2_Evbuf.
*/
typedef struct {
struct LV2_Evbuf_Iterator
{
LV2_Evbuf* evbuf;
uint32_t offset;
} LV2_Evbuf_Iterator;
};
/**
Allocate a new, empty event buffer.

View File

@@ -42,7 +42,7 @@ namespace lmms
struct ConnectPortVisitor;
typedef struct LV2_Evbuf_Impl LV2_Evbuf;
using LV2_Evbuf = struct LV2_Evbuf_Impl;
namespace Lv2Ports {

View File

@@ -52,8 +52,10 @@ public:
template<typename T>
struct MmAllocator
{
typedef T value_type;
template<class U> struct rebind { typedef MmAllocator<U> other; };
using value_type = T;
template<class U> struct rebind {
using other = MmAllocator<U>;
};
T* allocate( std::size_t n )
{
@@ -65,7 +67,7 @@ struct MmAllocator
MemoryManager::free( p );
}
typedef std::vector<T, MmAllocator<T> > vector;
using vector = std::vector<T, MmAllocator<T>>;
};

View File

@@ -81,8 +81,7 @@ enum MidiMetaEventTypes
MidiMetaCustom = 0x80,
MidiNotePanning
} ;
typedef MidiMetaEventTypes MidiMetaEventType;
using MidiMetaEventType = MidiMetaEventTypes;
enum MidiStandardControllers
{

View File

@@ -140,7 +140,7 @@ private:
QMap<MIDIEndpointRef, MIDIPortRef> m_sourcePortRef;
// subscriptions
typedef QMap<QString, MidiPortList> SubMap;
using SubMap = QMap<QString, MidiPortList>;
SubMap m_inputSubs;
SubMap m_outputSubs;

View File

@@ -67,7 +67,7 @@ class MidiPort : public Model, public SerializingObject
mapPropertyFromModel(bool,isReadable,setReadable,m_readableModel);
mapPropertyFromModel(bool,isWritable,setWritable,m_writableModel);
public:
typedef QMap<QString, bool> Map;
using Map = QMap<QString, bool>;
enum Modes
{
@@ -76,7 +76,7 @@ public:
Output, // from MIDI-event-processor to MIDI-client
Duplex // both directions
} ;
typedef Modes Mode;
using Mode = Modes;
MidiPort( const QString& name,
MidiClient* client,
@@ -186,8 +186,7 @@ signals:
} ;
typedef QList<MidiPort *> MidiPortList;
using MidiPortList = QList<MidiPort*>;
} // namespace lmms

View File

@@ -134,7 +134,7 @@ private:
QMap<HMIDIOUT, QString> m_outputDevices;
// subscriptions
typedef QMap<QString, MidiPortList> SubMap;
using SubMap = QMap<QString, MidiPortList>;
SubMap m_inputSubs;
SubMap m_outputSubs;

View File

@@ -39,7 +39,7 @@ namespace lmms
class MixerRoute;
typedef QVector<MixerRoute *> MixerRouteVector;
using MixerRouteVector = QVector<MixerRoute*>;
class MixerChannel : public ThreadableJob
{

View File

@@ -249,9 +249,7 @@ private:
DetuningHelper * m_detuning;
};
typedef QVector<Note *> NoteVector;
using NoteVector = QVector<Note*>;
struct NoteBounds
{

View File

@@ -42,9 +42,8 @@ namespace lmms
class InstrumentTrack;
class NotePlayHandle;
typedef QList<NotePlayHandle *> NotePlayHandleList;
typedef QList<const NotePlayHandle *> ConstNotePlayHandleList;
using NotePlayHandleList = QList<NotePlayHandle*>;
using ConstNotePlayHandleList = QList<const NotePlayHandle*>;
class LMMS_EXPORT NotePlayHandle : public PlayHandle, public Note
{
@@ -65,7 +64,7 @@ public:
OriginArpeggio, /*! created by arpeggio instrument function */
OriginCount
};
typedef Origins Origin;
using Origin = Origins;
NotePlayHandle( InstrumentTrack* instrumentTrack,
const f_cnt_t offset,

View File

@@ -50,9 +50,8 @@ namespace lmms::OscillatorConstants
// - wave shape: abstract and precise definition of the graph associated with a given type of wave;
// - waveform: digital representations the wave shape, a set of waves optimized for use at varying pitches;
// - wavetable: a table containing one period of a wave, with frequency content optimized for a specific pitch.
typedef std::array<sample_t, WAVETABLE_LENGTH> wavetable_t;
typedef std::array<wavetable_t, WAVE_TABLES_PER_WAVEFORM_COUNT> waveform_t;
using wavetable_t = std::array<sample_t, WAVETABLE_LENGTH>;
using waveform_t = std::array<wavetable_t, WAVE_TABLES_PER_WAVEFORM_COUNT>;
} // namespace lmms::OscillatorConstants

View File

@@ -94,7 +94,7 @@ protected:
private:
QList<Track *> m_disabledTracks;
typedef QMap<PatternTrack*, int> infoMap;
using infoMap = QMap<PatternTrack*, int>;
static infoMap s_infoMap;
friend class gui::PatternTrackView;

View File

@@ -36,8 +36,7 @@ namespace lmms
class PeakControllerEffect;
typedef QVector<PeakControllerEffect *> PeakControllerEffectVector;
using PeakControllerEffectVector = QVector<PeakControllerEffect*>;
class LMMS_EXPORT PeakController : public Controller
{

View File

@@ -30,8 +30,7 @@
namespace lmms
{
typedef int16_t pitch_t;
using pitch_t = int16_t;
constexpr pitch_t CentsPerSemitone = 100;
constexpr pitch_t MinPitchDefault = -CentsPerSemitone;

View File

@@ -52,7 +52,7 @@ public:
TypeSamplePlayHandle = 0x04,
TypePresetPreviewHandle = 0x08
} ;
typedef Types Type;
using Type = Types;
enum
{
@@ -161,9 +161,8 @@ private:
AudioPort * m_audioPort;
} ;
typedef QList<PlayHandle *> PlayHandleList;
typedef QList<const PlayHandle *> ConstPlayHandleList;
using PlayHandleList = QList<PlayHandle*>;
using ConstPlayHandleList = QList<const PlayHandle*>;
} // namespace lmms

View File

@@ -136,7 +136,7 @@ public:
*/
struct Key
{
typedef QMap<QString, QString> AttributeMap;
using AttributeMap = QMap<QString, QString>;
inline Key( const Plugin::Descriptor * desc = nullptr,
const QString & name = QString(),
@@ -179,8 +179,7 @@ public:
const PixmapLoader* logo() const;
} ;
typedef QList<Key> KeyList;
using KeyList = QList<Key>;
SubPluginFeatures( Plugin::PluginTypes type ) :
m_type( type )
@@ -235,7 +234,7 @@ public:
} ;
// typedef a list so we can easily work with list of plugin descriptors
typedef QList<Descriptor*> DescriptorList;
using DescriptorList = QList<Descriptor*>;
//! Constructor of a plugin
//! @param key Sub plugins must pass a key here, optional otherwise.
@@ -307,8 +306,7 @@ private:
Descriptor::SubPluginFeatures::Key m_key;
// pointer to instantiation-function in plugin
typedef Plugin * ( * InstantiationHook )( Model * , void * );
using InstantiationHook = Plugin* (*)(Model*, void*);
} ;

View File

@@ -62,7 +62,7 @@ class PluginDescWidget : public QWidget
{
Q_OBJECT
public:
typedef Plugin::Descriptor::SubPluginFeatures::Key PluginKey;
using PluginKey = Plugin::Descriptor::SubPluginFeatures::Key;
PluginDescWidget( const PluginKey & _pk, QWidget * _parent );
QString name() const;

View File

@@ -53,8 +53,8 @@ public:
bool isNull() const {return ! library;}
};
typedef QList<PluginInfo> PluginInfoList;
typedef QMultiMap<Plugin::PluginTypes, Plugin::Descriptor*> DescriptorMap;
using PluginInfoList = QList<PluginInfo>;
using DescriptorMap = QMultiMap<Plugin::PluginTypes, Plugin::Descriptor*>;
PluginFactory();
~PluginFactory() = default;

View File

@@ -100,7 +100,7 @@ public:
private:
typedef QHash<jo_id_t, JournallingObject *> JoIdMap;
using JoIdMap = QHash<jo_id_t, JournallingObject*>;
struct CheckPoint
{
@@ -112,7 +112,7 @@ private:
jo_id_t joID;
DataFile data;
} ;
typedef QStack<CheckPoint> CheckPointStack;
using CheckPointStack = QStack<CheckPoint>;
JoIdMap m_joIDs;

View File

@@ -61,7 +61,7 @@ private:
virtual void writeBuffer( const sampleFrame * _ab,
const f_cnt_t _frames );
typedef QList<QPair<sampleFrame *, f_cnt_t> > bufferList;
using bufferList = QList<QPair<sampleFrame*, f_cnt_t>>;
bufferList m_buffers;
f_cnt_t m_framesRecorded;
TimePos m_minLength;

View File

@@ -165,10 +165,9 @@ private:
bool m_vstAlwaysOnTop;
bool m_disableAutoQuit;
typedef QMap<QString, AudioDeviceSetupWidget *> AswMap;
typedef QMap<QString, MidiSetupWidget *> MswMap;
typedef QMap<QString, QString> trMap;
using AswMap = QMap<QString, AudioDeviceSetupWidget*>;
using MswMap = QMap<QString, MidiSetupWidget*>;
using trMap = QMap<QString, QString>;
// Audio settings widgets.
QComboBox * m_audioInterfaces;

View File

@@ -53,7 +53,7 @@ private slots:
private:
QButtonGroup m_btnGroup;
typedef QMap<QToolButton *, QWidget *> ButtonMap;
using ButtonMap = QMap<QToolButton*, QWidget*>;
ButtonMap m_widgets;
} ;

View File

@@ -91,7 +91,7 @@ private:
QString name; // name for widget
int nwidth; // width of name when painting (only valid for text tab)
} ;
typedef QMap<int, widgetDesc> widgetStack;
using widgetStack = QMap<int, widgetDesc>;
widgetStack m_widgets;

View File

@@ -57,7 +57,7 @@ private:
BarsTicks,
DisplayModeCount
};
typedef DisplayModes DisplayMode;
using DisplayMode = DisplayModes;
void setDisplayMode( DisplayMode displayMode );

View File

@@ -70,7 +70,7 @@ class LMMS_EXPORT Track : public Model, public JournallingObject
mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel);
mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel);
public:
typedef QVector<Clip *> clipVector;
using clipVector = QVector<Clip*>;
enum TrackTypes
{

View File

@@ -49,7 +49,7 @@ class LMMS_EXPORT TrackContainer : public Model, public JournallingObject
{
Q_OBJECT
public:
typedef QVector<Track *> TrackList;
using TrackList = QVector<Track*>;
enum TrackContainerTypes
{
PatternContainer,

View File

@@ -196,7 +196,7 @@ private:
friend class TrackContainerView::scrollArea;
TrackContainer* m_tc;
typedef QList<TrackView *> trackViewList;
using trackViewList = QList<TrackView*>;
trackViewList m_trackViews;
scrollArea * m_scrollArea;

View File

@@ -132,7 +132,7 @@ private:
TrackView * m_trackView;
typedef QVector<ClipView *> clipViewVector;
using clipViewVector = QVector<ClipView*>;
clipViewVector m_clipViews;
QPixmap m_background;

View File

@@ -296,8 +296,6 @@ public:
} ;
typedef intptr_t (VST_CALL_CONV * audioMasterCallback)( AEffect * , int32_t, int32_t, intptr_t, void * , float );
using audioMasterCallback = intptr_t (VST_CALL_CONV*)(AEffect*, int32_t, int32_t, intptr_t, void*, float);
#endif

View File

@@ -38,27 +38,23 @@
namespace lmms
{
using bar_t = int32_t;
using tick_t = int32_t;
using volume_t = uint8_t;
using panning_t = int8_t;
typedef int32_t bar_t;
typedef int32_t tick_t;
typedef uint8_t volume_t;
typedef int8_t panning_t;
using sample_t = float; // standard sample-type
using int_sample_t = int16_t; // 16-bit-int-sample
using sample_rate_t = uint32_t; // sample-rate
using fpp_t = int16_t; // frames per period (0-16384)
using f_cnt_t = int32_t; // standard frame-count
using ch_cnt_t = uint8_t; // channel-count (0-SURROUND_CHANNELS)
using bpm_t = uint16_t; // tempo (MIN_BPM to MAX_BPM)
using bitrate_t = uint16_t; // bitrate in kbps
using mix_ch_t = uint16_t; // Mixer-channel (0 to MAX_CHANNEL)
typedef float sample_t; // standard sample-type
typedef int16_t int_sample_t; // 16-bit-int-sample
typedef uint32_t sample_rate_t; // sample-rate
typedef int16_t fpp_t; // frames per period (0-16384)
typedef int32_t f_cnt_t; // standard frame-count
typedef uint8_t ch_cnt_t; // channel-count (0-SURROUND_CHANNELS)
typedef uint16_t bpm_t; // tempo (MIN_BPM to MAX_BPM)
typedef uint16_t bitrate_t; // bitrate in kbps
typedef uint16_t mix_ch_t; // Mixer-channel (0 to MAX_CHANNEL)
typedef uint32_t jo_id_t; // (unique) ID of a journalling object
using jo_id_t = uint32_t; // (unique) ID of a journalling object
// windows headers define "min" and "max" macros, breaking the methods bwloe
#undef min

View File

@@ -36,11 +36,10 @@ constexpr volume_t MinVolume = 0;
constexpr volume_t MaxVolume = 200;
constexpr volume_t DefaultVolume = 100;
typedef struct
struct StereoVolumeVector
{
float vol[2];
} StereoVolumeVector;
};
} // namespace lmms

View File

@@ -98,7 +98,7 @@ signals:
private:
typedef SampleBuffer::handleState handleState;
using handleState = SampleBuffer::handleState;
SampleBuffer m_sampleBuffer;

View File

@@ -41,7 +41,7 @@ public:
blargg_err_t set_sample_rate(long sample_rate, long clock_rate);
long samples_avail() const;
typedef blip_sample_t sample_t;
using sample_t = blip_sample_t;
long read_samples(sample_t* out, long count);
void bass_freq(int freq);
private:

View File

@@ -154,11 +154,8 @@ QString KickerInstrument::nodeName() const
return kicker_plugin_descriptor.name;
}
typedef DspEffectLibrary::Distortion DistFX;
typedef KickerOsc<DspEffectLibrary::MonoToStereoAdaptor<DistFX> > SweepOsc;
using DistFX = DspEffectLibrary::Distortion;
using SweepOsc = KickerOsc<DspEffectLibrary::MonoToStereoAdaptor<DistFX>>;
void KickerInstrument::playNote( NotePlayHandle * _n,
sampleFrame * _working_buffer )

View File

@@ -33,7 +33,7 @@ namespace lmms
class LadspaControl;
typedef QVector<LadspaControl *> control_list_t;
using control_list_t = QVector<LadspaControl*>;
class LadspaEffect;

View File

@@ -311,7 +311,7 @@ void LadspaEffect::pluginInstantiation()
multi_proc_t ports;
for( int port = 0; port < m_portCount; port++ )
{
port_desc_t * p = new PortDescription;
port_desc_t * p = new port_desc_t;
p->name = manager->getPortName( m_key, port );
p->proc = proc;

View File

@@ -36,9 +36,8 @@
namespace lmms
{
typedef struct PortDescription port_desc_t;
typedef QVector<port_desc_t *> multi_proc_t;
struct port_desc_t;
using multi_proc_t = QVector<port_desc_t*>;
class LadspaEffect : public Effect
{

View File

@@ -38,7 +38,7 @@ namespace lmms
const int BUFFER_SIZE = 50*1024;
typedef MidiFile::MIDITrack<BUFFER_SIZE> MTrack;
using MTrack = MidiFile::MIDITrack<BUFFER_SIZE>;
struct MidiNote
{
@@ -53,10 +53,8 @@ struct MidiNote
}
} ;
typedef std::vector<MidiNote> MidiNoteVector;
typedef std::vector<MidiNote>::iterator MidiNoteIterator;
using MidiNoteVector = std::vector<MidiNote>;
using MidiNoteIterator = std::vector<MidiNote>::iterator;
class MidiExport: public ExportFilter
{

View File

@@ -120,8 +120,7 @@ private:
}
}
typedef QVector<QPair<int, MidiEvent> > EventVector;
using EventVector = QVector<QPair<int, MidiEvent>>;
EventVector m_events;
int m_timingDivision;

View File

@@ -84,13 +84,13 @@ public slots:
private:
typedef struct
struct handle_data
{
MM_OPERATORS
SampleBuffer::handleState* state;
bool tuned;
SampleBuffer* sample;
} handle_data;
};
QString m_patchFile;
QVector<SampleBuffer *> m_patchSamples;

View File

@@ -101,8 +101,7 @@ private:
} ;
typedef IntModel NineButtonSelectorModel;
using NineButtonSelectorModel = IntModel;
} // namespace lmms::gui

View File

@@ -475,7 +475,7 @@ private:
std::mutex m_shmLock;
bool m_shmValid;
typedef std::vector<VstMidiEvent> VstMidiEventList;
using VstMidiEventList = std::vector<VstMidiEvent>;
VstMidiEventList m_midiEvents;
bpm_t m_bpm;
@@ -969,8 +969,7 @@ bool RemoteVstPlugin::load( const std::string & _plugin_file )
}
#endif
typedef AEffect * ( VST_CALL_CONV * mainEntryPointer )
( audioMasterCallback );
using mainEntryPointer = AEffect* (VST_CALL_CONV*) (audioMasterCallback);
#ifndef NATIVE_LINUX_VST
mainEntryPointer mainEntry = (mainEntryPointer)
GetProcAddress( m_libInst, "VSTPluginMain" );

View File

@@ -43,10 +43,9 @@
namespace lmms
{
typedef exprtk::symbol_table<float> symbol_table_t;
typedef exprtk::expression<float> expression_t;
typedef exprtk::parser<float> parser_t;
using symbol_table_t = exprtk::symbol_table<float>;
using expression_t = exprtk::expression<float>;
using parser_t = exprtk::parser<float>;
template <typename T,typename Functor,bool optimize>
struct freefunc0 : public exprtk::ifunction<T>

View File

@@ -51,7 +51,7 @@ class PixmapButton;
class ExprFront
{
public:
typedef float (*ff1data_functor)(void*, float);
using ff1data_functor = float (*)(void*, float);
ExprFront(const char* expr, int last_func_samples);
~ExprFront();
bool compile();

View File

@@ -64,9 +64,7 @@
namespace lmms
{
typedef LocklessList<PlayHandle *>::Element LocklessListElement;
using LocklessListElement = LocklessList<PlayHandle*>::Element;
static thread_local bool s_renderingThread;

View File

@@ -30,7 +30,7 @@
namespace lmms
{
WaveMipMap BandLimitedWave::s_waveforms[4] = { };
std::array<WaveMipMap, BandLimitedWave::Waveforms::NumBLWaveforms> BandLimitedWave::s_waveforms = { };
bool BandLimitedWave::s_wavesGenerated = false;
QString BandLimitedWave::s_wavetableDir = "";

View File

@@ -234,7 +234,7 @@ void Oscillator::generateWaveTables()
// Generate tables for simple shaped (constructed by summing sine waves).
// Start from the table that contains the least number of bands, and re-use each table in the following
// iteration, adding more bands in each step and avoiding repeated computation of earlier bands.
typedef void (*generator_t)(int, sample_t*, int);
using generator_t = void (*)(int, sample_t*, int);
auto simpleGen = [](WaveShapes shape, generator_t generator)
{
const int shapeID = shape - FirstWaveShapeTable;

View File

@@ -538,7 +538,7 @@ DataFile ClipView::createClipDataFiles(
DataFile dataFile( DataFile::DragNDropData );
QDomElement clipParent = dataFile.createElement("clips");
typedef QVector<ClipView *> clipViewVector;
using clipViewVector = QVector<ClipView*>;
for( clipViewVector::const_iterator it = clipViews.begin();
it != clipViews.end(); ++it )
{

View File

@@ -77,7 +77,7 @@ namespace lmms
{
typedef AutomationClip::timeMap timeMap;
using timeMap = AutomationClip::timeMap;
namespace gui

View File

@@ -922,7 +922,7 @@ void InstrumentTrack::loadTrackSpecificSettings( const QDomElement & thisElement
}
else if(node.nodeName() == "instrument")
{
typedef Plugin::Descriptor::SubPluginFeatures::Key PluginKey;
using PluginKey = Plugin::Descriptor::SubPluginFeatures::Key;
PluginKey key(node.toElement().elementsByTagName("key").item(0).toElement());
if (reuseInstrument)