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

@@ -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();