diff --git a/source/backend/native/3bandeq/DistrhoPlugin3BandEQ.cpp b/source/backend/native/3bandeq/DistrhoPlugin3BandEQ.cpp index 31e8da2b4..90df47c80 100644 --- a/source/backend/native/3bandeq/DistrhoPlugin3BandEQ.cpp +++ b/source/backend/native/3bandeq/DistrhoPlugin3BandEQ.cpp @@ -231,7 +231,7 @@ void DistrhoPlugin3BandEQ::d_run(float** inputs, float** outputs, uint32_t frame float* out1 = outputs[0]; float* out2 = outputs[1]; - for (uint32_t i=0; i < frames; i++) + for (uint32_t i=0; i < frames; ++i) { tmp1LP = a0LP * in1[i] - b1LP * tmp1LP + cfDC_ADD; tmp2LP = a0LP * in2[i] - b1LP * tmp2LP + cfDC_ADD; diff --git a/source/backend/native/3bandsplitter/DistrhoPlugin3BandSplitter.cpp b/source/backend/native/3bandsplitter/DistrhoPlugin3BandSplitter.cpp index d6be2e22b..57092fdf0 100644 --- a/source/backend/native/3bandsplitter/DistrhoPlugin3BandSplitter.cpp +++ b/source/backend/native/3bandsplitter/DistrhoPlugin3BandSplitter.cpp @@ -235,7 +235,7 @@ void DistrhoPlugin3BandSplitter::d_run(float** inputs, float** outputs, uint32_t float* out5 = outputs[4]; float* out6 = outputs[5]; - for (uint32_t i=0; i < frames; i++) + for (uint32_t i=0; i < frames; ++i) { tmp1LP = a0LP * in1[i] - b1LP * tmp1LP + cfDC_ADD; tmp2LP = a0LP * in2[i] - b1LP * tmp2LP + cfDC_ADD; diff --git a/source/backend/native/audiofile.c b/source/backend/native/audiofile.c index 90703bf72..d392b5b92 100644 --- a/source/backend/native/audiofile.c +++ b/source/backend/native/audiofile.c @@ -137,7 +137,7 @@ void audiofile_read_poll(AudioFileInstance* const handlePtr) // lock, and put data asap pthread_mutex_lock(&handlePtr->mutex); - for (; i < handlePtr->pool.size && j < rv; j++) + for (; i < handlePtr->pool.size && j < rv; ++j) { if (handlePtr->fileNfo.channels == 1) { @@ -163,7 +163,7 @@ void audiofile_read_poll(AudioFileInstance* const handlePtr) { while (i < handlePtr->pool.size) { - for (j=0; i < handlePtr->pool.size && j < rv; j++) + for (j=0; i < handlePtr->pool.size && j < rv; ++j) { if (handlePtr->fileNfo.channels == 1) { @@ -188,7 +188,7 @@ void audiofile_read_poll(AudioFileInstance* const handlePtr) } else { - for (; i < handlePtr->pool.size; i++) + for (; i < handlePtr->pool.size; ++i) { handlePtr->pool.buffer[0][i] = 0.0f; handlePtr->pool.buffer[1][i] = 0.0f; @@ -315,7 +315,7 @@ static PluginHandle audiofile_instantiate(const PluginDescriptor* _this_, HostDe ad_clear_nfo(&handlePtr->fileNfo); pthread_mutex_init(&handlePtr->mutex, NULL); - for (uint32_t i=0; i < PROGRAM_COUNT; i++) + for (uint32_t i=0; i < PROGRAM_COUNT; ++i) { handlePtr->programs.fullNames[i] = NULL; handlePtr->programs.shortNames[i] = NULL; @@ -375,7 +375,7 @@ static void audiofile_cleanup(PluginHandle handle) if (handlePtr->pool.buffer[1] != NULL) free(handlePtr->pool.buffer[1]); - for (uint32_t i=0; i < PROGRAM_COUNT; i++) + for (uint32_t i=0; i < PROGRAM_COUNT; ++i) { if (handlePtr->programs.fullNames[i] != NULL) free((void*)handlePtr->programs.fullNames[i]); @@ -608,7 +608,7 @@ static void audiofile_process(PluginHandle handle, float** inBuffer, float** out int64_t poolFrame = (int64_t)timePos->frame - handlePtr->pool.startFrame; int64_t poolSize = handlePtr->pool.size; - for (uint32_t i=0; i < frames; i++, poolFrame++) + for (uint32_t i=0; i < frames; ++i, ++poolFrame) { if (poolFrame >= 0 && poolFrame < poolSize) { diff --git a/source/backend/native/distrho/DistrhoPluginCarla.cpp b/source/backend/native/distrho/DistrhoPluginCarla.cpp index 3bebcf3d8..31534966a 100644 --- a/source/backend/native/distrho/DistrhoPluginCarla.cpp +++ b/source/backend/native/distrho/DistrhoPluginCarla.cpp @@ -373,7 +373,7 @@ protected: { uint32_t i; - for (i=0; i < midiEventCount && i < MAX_MIDI_EVENTS; i++) + for (i=0; i < midiEventCount && i < MAX_MIDI_EVENTS; ++i) { const ::MidiEvent* const midiEvent = &midiEvents[i]; MidiEvent* const realMidiEvent = &fRealMidiEvents[i]; diff --git a/source/backend/native/midi-file.cpp b/source/backend/native/midi-file.cpp index bd0d00f71..1e56ee8db 100644 --- a/source/backend/native/midi-file.cpp +++ b/source/backend/native/midi-file.cpp @@ -73,7 +73,7 @@ protected: midiEvent.data[3] = 0; midiEvent.size = 2; - for (int i=0; i < MAX_MIDI_CHANNELS; i++) + for (int i=0; i < MAX_MIDI_CHANNELS; ++i) { midiEvent.data[0] += i; PluginDescriptorClass::writeMidiEvent(&midiEvent); diff --git a/source/backend/native/midi-sequencer.cpp b/source/backend/native/midi-sequencer.cpp index 8191c494b..2b4e12df5 100644 --- a/source/backend/native/midi-sequencer.cpp +++ b/source/backend/native/midi-sequencer.cpp @@ -144,7 +144,7 @@ protected: { RawMidiEvent rawMidiEvent; - for (uint32_t i=0; i < midiEventCount; i++) + for (uint32_t i=0; i < midiEventCount; ++i) { const MidiEvent* const midiEvent = &midiEvents[i]; diff --git a/source/backend/native/nekofilter/filter.c b/source/backend/native/nekofilter/filter.c index 4c0e1808c..38ac7be09 100644 --- a/source/backend/native/nekofilter/filter.c +++ b/source/backend/native/nekofilter/filter.c @@ -171,7 +171,7 @@ filter_create( filter_ptr->fade = 0; filter_ptr->gain = 1.0; - for (j = 0; j < bands_count; j++) + for (j = 0; j < bands_count; ++j) { param_sect_init(filter_ptr->sect + j); } @@ -246,7 +246,7 @@ filter_run( fgain = exp2ap(0.1661 * *filter_ptr->global_parameters[GLOBAL_PARAMETER_GAIN]); - for (j = 0; j < bands_count; j++) + for (j = 0; j < bands_count; ++j) { t = *filter_ptr->band_parameters[BAND_PARAMETERS_COUNT * j + BAND_PARAMETER_FREQUENCY] / filter_ptr->sample_rate; if (t < 0.0002) @@ -289,13 +289,13 @@ filter_run( filter_ptr->gain = t; d = (t - g) / k; - for (i = 0; i < k; i++) + for (i = 0; i < k; ++i) { g += d; sig[i] = g * input_buffer[i]; } - for (j = 0; j < bands_count; j++) + for (j = 0; j < bands_count; ++j) { param_sect_proc(filter_ptr->sect + j, k, sig, sfreq[j], sband[j], sgain[j]); } @@ -336,7 +336,7 @@ filter_run( else { d = (j / 16.0 - g) / k; - for (i = 0; i < k; i++) + for (i = 0; i < k; ++i) { g += d; output_buffer[i] = g * sig[i] + (1 - g) * input_buffer[i]; diff --git a/source/backend/native/nekofilter/ui.c b/source/backend/native/nekofilter/ui.c index c40e1ec2a..5c0cafc06 100644 --- a/source/backend/native/nekofilter/ui.c +++ b/source/backend/native/nekofilter/ui.c @@ -124,7 +124,7 @@ wait_child( return false; } - for (i = 0; i < WAIT_ZOMBIE_TIMEOUT / WAIT_STEP; i++) + for (i = 0; i < WAIT_ZOMBIE_TIMEOUT / WAIT_STEP; ++i) { //printf("waitpid(%d): %d\n", (int)pid, i); diff --git a/source/backend/native/pingpongpan/DistrhoPluginPingPongPan.cpp b/source/backend/native/pingpongpan/DistrhoPluginPingPongPan.cpp index f1795469a..2e7d18ba3 100644 --- a/source/backend/native/pingpongpan/DistrhoPluginPingPongPan.cpp +++ b/source/backend/native/pingpongpan/DistrhoPluginPingPongPan.cpp @@ -141,7 +141,7 @@ void DistrhoPluginPingPongPan::d_run(float** inputs, float** outputs, uint32_t f float* out1 = outputs[0]; float* out2 = outputs[1]; - for (uint32_t i=0; i < frames; i++) + for (uint32_t i=0; i < frames; ++i) { pan = std::fmin(std::fmax(std::sin(wavePos) * (fWidth/100.0f), -1.0f), 1.0f); diff --git a/source/backend/native/zynaddsubfx.cpp b/source/backend/native/zynaddsubfx.cpp index 8549056b0..b18feef21 100644 --- a/source/backend/native/zynaddsubfx.cpp +++ b/source/backend/native/zynaddsubfx.cpp @@ -255,7 +255,7 @@ protected: void activate() override { // broken - //for (int i=0; i < NUM_MIDI_PARTS; i++) + //for (int i=0; i < NUM_MIDI_PARTS; ++i) // kMaster->setController(0, MIDI_CONTROL_ALL_SOUND_OFF, 0); fIsActive = true; @@ -275,7 +275,7 @@ protected: return; } - for (uint32_t i=0; i < midiEventCount; i++) + for (uint32_t i=0; i < midiEventCount; ++i) { const MidiEvent* const midiEvent = &midiEvents[i]; @@ -584,7 +584,7 @@ public: sprng(std::time(nullptr)); denormalkillbuf = new float[synth->buffersize]; - for (int i=0; i < synth->buffersize; i++) + for (int i=0; i < synth->buffersize; ++i) denormalkillbuf[i] = (RND - 0.5f) * 1e-16; Master::getInstance(); diff --git a/source/backend/standalone/CarlaStandalone.cpp b/source/backend/standalone/CarlaStandalone.cpp index f76d958b8..f8880d776 100644 --- a/source/backend/standalone/CarlaStandalone.cpp +++ b/source/backend/standalone/CarlaStandalone.cpp @@ -2234,13 +2234,13 @@ protected: std::strcat(data, clientId); // wait max 6 secs for engine to start - for (int i=0; i < 60 && standalone.engine == nullptr; i++) + for (int i=0; i < 60 && standalone.engine == nullptr; ++i) carla_msleep(100); standalone.callback(nullptr, CarlaBackend::CALLBACK_NSM_OPEN, 0, 0, 0, 0.0f, data); // wait max 10 secs to open - for (int i=0; i < 100 && ! fIsOpened; i++) + for (int i=0; i < 100 && ! fIsOpened; ++i) carla_msleep(100); #ifndef BUILD_ANSI_TEST @@ -2273,7 +2273,7 @@ protected: standalone.callback(nullptr, CarlaBackend::CALLBACK_NSM_SAVE, 0, 0, 0, 0.0f, nullptr); // wait max 10 secs to save - for (int i=0; i < 100 && ! fIsOpened; i++) + for (int i=0; i < 100 && ! fIsOpened; ++i) carla_msleep(100); #ifndef BUILD_ANSI_TEST diff --git a/source/bridges/CarlaBridgePlugin.cpp b/source/bridges/CarlaBridgePlugin.cpp index 5ee6e11e1..8e69644a4 100644 --- a/source/bridges/CarlaBridgePlugin.cpp +++ b/source/bridges/CarlaBridgePlugin.cpp @@ -226,7 +226,7 @@ public: fPlugin->prepareForSave(); - for (uint32_t i=0; i < fPlugin->customDataCount(); i++) + for (uint32_t i=0; i < fPlugin->customDataCount(); ++i) { const CarlaBackend::CustomData& cdata(fPlugin->customData(i)); fEngine->osc_send_bridge_set_custom_data(cdata.type, cdata.key, cdata.value); diff --git a/source/bridges/CarlaBridgeUI-LV2.cpp b/source/bridges/CarlaBridgeUI-LV2.cpp index 18c6025b1..095a10671 100644 --- a/source/bridges/CarlaBridgeUI-LV2.cpp +++ b/source/bridges/CarlaBridgeUI-LV2.cpp @@ -124,10 +124,10 @@ public: m_resizable = true; #endif - for (uint32_t i=0; i < CARLA_URI_MAP_ID_COUNT; i++) + for (uint32_t i=0; i < CARLA_URI_MAP_ID_COUNT; ++i) customURIDs.push_back(nullptr); - for (uint32_t i=0; i < lv2_feature_count+1; i++) + for (uint32_t i=0; i < lv2_feature_count+1; ++i) features[i] = nullptr; // ----------------------------------------------------------------- @@ -310,13 +310,13 @@ public: delete (LV2UI_Port_Map*)features[lv2_feature_id_ui_port_map]->data; delete (LV2UI_Resize*)features[lv2_feature_id_ui_resize]->data; - for (uint32_t i=0; i < lv2_feature_count; i++) + for (uint32_t i=0; i < lv2_feature_count; ++i) { if (features[i]) delete features[i]; } - for (size_t i=0; i < customURIDs.size(); i++) + for (size_t i=0; i < customURIDs.size(); ++i) { if (customURIDs[i]) free((void*)customURIDs[i]); @@ -347,7 +347,7 @@ public: // ----------------------------------------------------------------- // find requested UI - for (uint32_t i=0; i < rdf_descriptor->UICount; i++) + for (uint32_t i=0; i < rdf_descriptor->UICount; ++i) { if (std::strcmp(rdf_descriptor->UIs[i].URI, uiURI) == 0) { @@ -398,7 +398,7 @@ public: // check if not resizable #ifndef BRIDGE_LV2_X11 - for (uint32_t i=0; i < rdf_ui_descriptor->FeatureCount; i++) + for (uint32_t i=0; i < rdf_ui_descriptor->FeatureCount; ++i) { if (std::strcmp(rdf_ui_descriptor->Features[i].URI, LV2_UI__fixedSize) == 0 || std::strcmp(rdf_ui_descriptor->Features[i].URI, LV2_UI__noUserResize) == 0) { @@ -411,7 +411,7 @@ public: // ----------------------------------------------------------- // check for known extensions - for (uint32_t i=0; descriptor->extension_data && i < rdf_ui_descriptor->ExtensionCount; i++) + for (uint32_t i=0; descriptor->extension_data && i < rdf_ui_descriptor->ExtensionCount; ++i) { if (std::strcmp(rdf_ui_descriptor->Extensions[i], LV2_PROGRAMS__UIInterface) == 0) { @@ -532,7 +532,7 @@ public: if (! uri) return CARLA_URI_MAP_ID_NULL; - for (size_t i=0; i < customURIDs.size(); i++) + for (size_t i=0; i < customURIDs.size(); ++i) { if (customURIDs[i] && std::strcmp(customURIDs[i], uri) == 0) return i; @@ -634,7 +634,7 @@ public: if (! symbol) return LV2UI_INVALID_PORT_INDEX; - for (uint32_t i=0; i < rdf_descriptor->PortCount; i++) + for (uint32_t i=0; i < rdf_descriptor->PortCount; ++i) { if (std::strcmp(rdf_descriptor->Ports[i].Symbol, symbol) == 0) return i; diff --git a/source/bridges/CarlaBridgeUI-VST.cpp b/source/bridges/CarlaBridgeUI-VST.cpp index 685ff7ced..49d34c766 100644 --- a/source/bridges/CarlaBridgeUI-VST.cpp +++ b/source/bridges/CarlaBridgeUI-VST.cpp @@ -261,7 +261,7 @@ public: if (isOscControlRegistered()) return 1; - for (int32_t i=0; i < vstEvents->numEvents; i++) + for (int32_t i=0; i < vstEvents->numEvents; ++i) { if (! vstEvents->events[i]) break; diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index 272e42780..215d0cde9 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -418,7 +418,7 @@ void do_ladspa_check(void* const libHandle, const bool init) if (LADSPA_IS_HARD_RT_CAPABLE(descriptor->Properties)) hints |= PLUGIN_IS_RTSAFE; - for (unsigned long j=0; j < descriptor->PortCount; j++) + for (unsigned long j=0; j < descriptor->PortCount; ++j) { CARLA_ASSERT(descriptor->PortNames[j] != nullptr); const LADSPA_PortDescriptor portDescriptor = descriptor->PortDescriptors[j]; @@ -471,7 +471,7 @@ void do_ladspa_check(void* const libHandle, const bool init) LADSPA_Data bufferParams[parametersTotal]; LADSPA_Data min, max, def; - for (unsigned long j=0, iA=0, iC=0; j < descriptor->PortCount; j++) + for (unsigned long j=0, iA=0, iC=0; j < descriptor->PortCount; ++j) { const LADSPA_PortDescriptor portDescriptor = descriptor->PortDescriptors[j]; const LADSPA_PortRangeHint portRangeHints = descriptor->PortRangeHints[j]; @@ -637,7 +637,7 @@ void do_dssi_check(void* const libHandle, const bool init) if (LADSPA_IS_HARD_RT_CAPABLE(ldescriptor->Properties)) hints |= PLUGIN_IS_RTSAFE; - for (unsigned long j=0; j < ldescriptor->PortCount; j++) + for (unsigned long j=0; j < ldescriptor->PortCount; ++j) { CARLA_ASSERT(ldescriptor->PortNames[j] != nullptr); const LADSPA_PortDescriptor portDescriptor = ldescriptor->PortDescriptors[j]; @@ -702,7 +702,7 @@ void do_dssi_check(void* const libHandle, const bool init) LADSPA_Data bufferParams[parametersTotal]; LADSPA_Data min, max, def; - for (unsigned long j=0, iA=0, iC=0; j < ldescriptor->PortCount; j++) + for (unsigned long j=0, iA=0, iC=0; j < ldescriptor->PortCount; ++j) { const LADSPA_PortDescriptor portDescriptor = ldescriptor->PortDescriptors[j]; const LADSPA_PortRangeHint portRangeHints = ldescriptor->PortRangeHints[j]; @@ -876,7 +876,7 @@ void do_lv2_check(const char* const bundle, const bool init) } // Get & check every plugin-instance - for (int i=0; i < URIs.count(); i++) + for (int i=0; i < URIs.count(); ++i) { const LV2_RDF_Descriptor* const rdfDescriptor = lv2_rdf_new(URIs.at(i).toUtf8().constData()); CARLA_ASSERT(rdfDescriptor != nullptr && rdfDescriptor->URI != nullptr); @@ -917,7 +917,7 @@ void do_lv2_check(const char* const bundle, const bool init) { bool supported = true; - for (uint32_t j=0; j < rdfDescriptor->PortCount && supported; j++) + for (uint32_t j=0; j < rdfDescriptor->PortCount && supported; ++j) { const LV2_RDF_Port* const rdfPort = &rdfDescriptor->Ports[j]; @@ -933,7 +933,7 @@ void do_lv2_check(const char* const bundle, const bool init) } } - for (uint32_t j=0; j < rdfDescriptor->FeatureCount && supported; j++) + for (uint32_t j=0; j < rdfDescriptor->FeatureCount && supported; ++j) { const LV2_RDF_Feature* const rdfFeature = &rdfDescriptor->Features[j]; @@ -968,7 +968,7 @@ void do_lv2_check(const char* const bundle, const bool init) int parametersTotal = 0; int programsTotal = rdfDescriptor->PresetCount; - for (uint32_t j=0; j < rdfDescriptor->FeatureCount; j++) + for (uint32_t j=0; j < rdfDescriptor->FeatureCount; ++j) { const LV2_RDF_Feature* const rdfFeature = &rdfDescriptor->Features[j]; @@ -976,7 +976,7 @@ void do_lv2_check(const char* const bundle, const bool init) hints |= PLUGIN_IS_RTSAFE; } - for (uint32_t j=0; j < rdfDescriptor->PortCount; j++) + for (uint32_t j=0; j < rdfDescriptor->PortCount; ++j) { const LV2_RDF_Port* const rdfPort = &rdfDescriptor->Ports[j]; @@ -1192,14 +1192,14 @@ void do_vst_check(void* const libHandle, const bool init) } float* bufferAudioIn[audioIns]; - for (int j=0; j < audioIns; j++) + for (int j=0; j < audioIns; ++j) { bufferAudioIn[j] = new float[kBufferSize]; carla_zeroFloat(bufferAudioIn[j], kBufferSize); } float* bufferAudioOut[audioOuts]; - for (int j=0; j < audioOuts; j++) + for (int j=0; j < audioOuts; ++j) { bufferAudioOut[j] = new float[kBufferSize]; carla_zeroFloat(bufferAudioOut[j], kBufferSize); @@ -1268,9 +1268,9 @@ void do_vst_check(void* const libHandle, const bool init) if (gVstNeedsIdle) effect->dispatcher(effect, effIdle, 0, 0, nullptr, 0.0f); - for (int j=0; j < audioIns; j++) + for (int j=0; j < audioIns; ++j) delete[] bufferAudioIn[j]; - for (int j=0; j < audioOuts; j++) + for (int j=0; j < audioOuts; ++j) delete[] bufferAudioOut[j]; } diff --git a/source/libs/distrho/DistrhoUtils.hpp b/source/libs/distrho/DistrhoUtils.hpp index 3fb7f9734..da9165e03 100644 --- a/source/libs/distrho/DistrhoUtils.hpp +++ b/source/libs/distrho/DistrhoUtils.hpp @@ -251,7 +251,7 @@ public: size_t find(const char c) { - for (size_t i=0; i < bufferLen; i++) + for (size_t i=0; i < bufferLen; ++i) { if (buffer[i] == c) return i; @@ -264,7 +264,7 @@ public: { size_t pos = 0; - for (size_t i=0; i < bufferLen; i++) + for (size_t i=0; i < bufferLen; ++i) { if (buffer[i] == c) pos = i; @@ -278,7 +278,7 @@ public: if (after == '\0') return; - for (size_t i=0; i < bufferLen; i++) + for (size_t i=0; i < bufferLen; ++i) { if (buffer[i] == before) buffer[i] = after; @@ -292,7 +292,7 @@ public: if (n >= bufferLen) return; - for (size_t i=n; i < bufferLen; i++) + for (size_t i=n; i < bufferLen; ++i) buffer[i] = '\0'; bufferLen = n; @@ -300,7 +300,7 @@ public: void toBasic() { - for (size_t i=0; i < bufferLen; i++) + for (size_t i=0; i < bufferLen; ++i) { if (buffer[i] >= '0' && buffer[i] <= '9') continue; @@ -319,7 +319,7 @@ public: { static const char charDiff = 'a' - 'A'; - for (size_t i=0; i < bufferLen; i++) + for (size_t i=0; i < bufferLen; ++i) { if (buffer[i] >= 'A' && buffer[i] <= 'Z') buffer[i] += charDiff; @@ -330,7 +330,7 @@ public: { static const char charDiff = 'a' - 'A'; - for (size_t i=0; i < bufferLen; i++) + for (size_t i=0; i < bufferLen; ++i) { if (buffer[i] >= 'a' && buffer[i] <= 'z') buffer[i] -= charDiff; diff --git a/source/libs/distrho/dgl/src/App.cpp b/source/libs/distrho/dgl/src/App.cpp index cb1851745..90edb959b 100644 --- a/source/libs/distrho/dgl/src/App.cpp +++ b/source/libs/distrho/dgl/src/App.cpp @@ -34,7 +34,7 @@ App::~App() void App::idle() { - for (std::list::iterator it = kPrivate->fWindows.begin(); it != kPrivate->fWindows.end(); it++) + for (std::list::iterator it = kPrivate->fWindows.begin(); it != kPrivate->fWindows.end(); ++it) { Window* window = *it; window->idle(); diff --git a/source/libs/distrho/src/DistrhoPluginInternal.hpp b/source/libs/distrho/src/DistrhoPluginInternal.hpp index 53ce9025f..c5d69b820 100644 --- a/source/libs/distrho/src/DistrhoPluginInternal.hpp +++ b/source/libs/distrho/src/DistrhoPluginInternal.hpp @@ -104,16 +104,16 @@ public: if (kPlugin == nullptr) return; - for (uint32_t i=0, count=kData->parameterCount; i < count; i++) + for (uint32_t i=0, count=kData->parameterCount; i < count; ++i) kPlugin->d_initParameter(i, kData->parameters[i]); #if DISTRHO_PLUGIN_WANT_PROGRAMS - for (uint32_t i=0, count=kData->programCount; i < count; i++) + for (uint32_t i=0, count=kData->programCount; i < count; ++i) kPlugin->d_initProgramName(i, kData->programNames[i]); #endif #if DISTRHO_PLUGIN_WANT_STATE - for (uint32_t i=0, count=kData->stateCount; i < count; i++) + for (uint32_t i=0, count=kData->stateCount; i < count; ++i) kPlugin->d_initStateKey(i, kData->stateKeys[i]); #endif } diff --git a/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp b/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp index abb3cbe25..d5c90ebf4 100644 --- a/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp +++ b/source/libs/distrho/src/DistrhoPluginLADSPA+DSSI.cpp @@ -48,7 +48,7 @@ public: portAudioIns{nullptr}, portAudioOuts{nullptr} { - for (uint32_t i=0, count=plugin.parameterCount(); i < count; i++) + for (uint32_t i=0, count=plugin.parameterCount(); i < count; ++i) { lastControlValues.push_back(plugin.parameterValue(i)); portControls.push_back(nullptr); @@ -74,7 +74,7 @@ public: { unsigned long i, count, index = 0; - for (i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; i++) + for (i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i) { if (port == index++) { @@ -83,7 +83,7 @@ public: } } - for (i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; i++) + for (i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; ++i) { if (port == index++) { @@ -108,7 +108,7 @@ public: } #endif - for (i=0, count=plugin.parameterCount(); i < count; i++) + for (i=0, count=plugin.parameterCount(); i < count; ++i) { if (port == index++) { @@ -159,7 +159,7 @@ public: plugin.setProgram(realProgram); // Update parameters - for (uint32_t i=0, count=plugin.parameterCount(); i < count; i++) + for (uint32_t i=0, count=plugin.parameterCount(); i < count; ++i) { if (! plugin.parameterIsOutput(i)) { @@ -199,7 +199,7 @@ public: // Check for updated parameters float curValue; - for (uint32_t i=0, count=plugin.parameterCount(); i < count; i++) + for (uint32_t i=0, count=plugin.parameterCount(); i < count; ++i) { curValue = *portControls[i]; @@ -215,7 +215,7 @@ public: // Get MIDI Events uint32_t midiEventCount = 0; - for (uint32_t i=0, j; i < eventCount && midiEventCount < MAX_MIDI_EVENTS; i++) + for (uint32_t i=0, j; i < eventCount && midiEventCount < MAX_MIDI_EVENTS; ++i) { snd_seq_event_t* event = &events[i]; @@ -314,7 +314,7 @@ private: void updateParameterOutputs() { - for (uint32_t i=0, count=plugin.parameterCount(); i < count; i++) + for (uint32_t i=0, count=plugin.parameterCount(); i < count; ++i) { if (plugin.parameterIsOutput(i)) { @@ -509,7 +509,7 @@ public: LADSPA_PortRangeHint* portRangeHints = new LADSPA_PortRangeHint [portCount]; // Set ports - for (i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; i++, port++) + for (i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i, ++port) { char portName[24] = { 0 }; sprintf(portName, "Audio Input %lu", i+1); @@ -522,7 +522,7 @@ public: portRangeHints[port].UpperBound = 1.0f; } - for (i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; i++, port++) + for (i=0; i < DISTRHO_PLUGIN_NUM_OUTPUTS; ++i, ++port) { char portName[24] = { 0 }; sprintf(portName, "Audio Output %lu", i+1); @@ -555,7 +555,7 @@ public: port++; #endif - for (i=0; i < plugin.parameterCount(); i++, port++) + for (i=0; i < plugin.parameterCount(); ++i, ++port) { portNames[port] = strdup((const char*)plugin.parameterName(i)); portDescriptors[port] = LADSPA_PORT_CONTROL; @@ -646,7 +646,7 @@ public: if (ldescriptor.PortNames != nullptr) { - for (unsigned long i=0; i < ldescriptor.PortCount; i++) + for (unsigned long i=0; i < ldescriptor.PortCount; ++i) { if (ldescriptor.PortNames[i] != nullptr) free((void*)ldescriptor.PortNames[i]); diff --git a/source/libs/distrho/src/DistrhoPluginVST.cpp b/source/libs/distrho/src/DistrhoPluginVST.cpp index f78a3f719..599f8519a 100644 --- a/source/libs/distrho/src/DistrhoPluginVST.cpp +++ b/source/libs/distrho/src/DistrhoPluginVST.cpp @@ -102,7 +102,7 @@ public: fParameterChecks = new bool[paramCount]; fParameterValues = new float[paramCount]; - for (uint32_t i=0; i < paramCount; i++) + for (uint32_t i=0; i < paramCount; ++i) { fParameterChecks[i] = false; fParameterValues[i] = 0.0f; @@ -139,7 +139,7 @@ public: } #endif - for (uint32_t i=0, count = kPlugin->parameterCount(); i < count; i++) + for (uint32_t i=0, count = kPlugin->parameterCount(); i < count; ++i) { if (fParameterChecks[i]) { @@ -181,7 +181,7 @@ public: fNextProgram = index; // set previous parameters invalid - for (uint32_t i=0, count = kPlugin->parameterCount(); i < count; i++) + for (uint32_t i=0, count = kPlugin->parameterCount(); i < count; ++i) fParameterChecks[i] = false; } #endif @@ -532,7 +532,7 @@ private: fVstUi->setProgramFromPlugin(fCurProgram); # endif - for (uint32_t i=0, count = fPlugin.parameterCount(); i < count; i++) + for (uint32_t i=0, count = fPlugin.parameterCount(); i < count; ++i) fVstUi->setParameterValueFromPlugin(i, fPlugin.parameterValue(i)); } } diff --git a/source/tests/RtList.cpp b/source/tests/RtList.cpp index 272e872ed..4d6143b0f 100644 --- a/source/tests/RtList.cpp +++ b/source/tests/RtList.cpp @@ -110,7 +110,7 @@ void run5Tests() assert(postRtEvents.dataPendingRT.isEmpty()); // Handle events now - for (unsigned short i=0; i < k; i++) + for (unsigned short i=0; i < k; ++i) { const MyData& my = allMyData[i]; diff --git a/source/tests/Utils.cpp b/source/tests/Utils.cpp index 3af0e8382..883e45db8 100644 --- a/source/tests/Utils.cpp +++ b/source/tests/Utils.cpp @@ -114,7 +114,7 @@ int main() carla_zeroMem(data2, sizeof(float)*500); - for (int i=0; i < 500; i++) + for (int i=0; i < 500; ++i) { assert(data0[i] == 0.0f); assert(data1[i] == 6.41f); diff --git a/source/theme/CarlaStyle.cpp b/source/theme/CarlaStyle.cpp index 35e0d2ca0..154272e18 100644 --- a/source/theme/CarlaStyle.cpp +++ b/source/theme/CarlaStyle.cpp @@ -395,7 +395,7 @@ static QPixmap colorizedImage(const QString &fileName, const QColor &color, int for (int y = 0; y < height; ++y) { QRgb *data = (QRgb*) image.scanLine(y); - for (int x = 0 ; x < width ; x++) { + for (int x = 0 ; x < width ; ++x) { QRgb col = data[x]; unsigned int colorDiff = (qBlue(col) - qRed(col)); unsigned char gray = qGreen(col); diff --git a/source/utils/CarlaLadspaUtils.hpp b/source/utils/CarlaLadspaUtils.hpp index 864a06f40..7489cd257 100644 --- a/source/utils/CarlaLadspaUtils.hpp +++ b/source/utils/CarlaLadspaUtils.hpp @@ -52,7 +52,7 @@ const LADSPA_RDF_Descriptor* ladspa_rdf_dup(const LADSPA_RDF_Descriptor* const o { newDescriptor->Ports = new LADSPA_RDF_Port[newDescriptor->PortCount]; - for (unsigned long i=0; i < newDescriptor->PortCount; i++) + for (unsigned long i=0; i < newDescriptor->PortCount; ++i) { LADSPA_RDF_Port* const oldPort = &oldDescriptor->Ports[i]; LADSPA_RDF_Port* const newPort = &newDescriptor->Ports[i]; @@ -70,7 +70,7 @@ const LADSPA_RDF_Descriptor* ladspa_rdf_dup(const LADSPA_RDF_Descriptor* const o { newPort->ScalePoints = new LADSPA_RDF_ScalePoint[oldPort->ScalePointCount]; - for (unsigned long j=0; j < oldPort->ScalePointCount; j++) + for (unsigned long j=0; j < oldPort->ScalePointCount; ++j) { LADSPA_RDF_ScalePoint* const oldScalePoint = &oldPort->ScalePoints[j]; LADSPA_RDF_ScalePoint* const newScalePoint = &newPort->ScalePoints[j]; @@ -125,7 +125,7 @@ bool is_ladspa_rdf_descriptor_valid(const LADSPA_RDF_Descriptor* const rdfDescri return false; } - for (unsigned long i=0; i < rdfDescriptor->PortCount; i++) + for (unsigned long i=0; i < rdfDescriptor->PortCount; ++i) { if (! is_ladspa_port_good(rdfDescriptor->Ports[i].Type, descriptor->PortDescriptors[i])) { diff --git a/source/utils/CarlaLv2Utils.hpp b/source/utils/CarlaLv2Utils.hpp index d671e19e8..5a42266c4 100644 --- a/source/utils/CarlaLv2Utils.hpp +++ b/source/utils/CarlaLv2Utils.hpp @@ -571,7 +571,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) rdfDescriptor->PortCount = lilvPlugin.get_num_ports(); rdfDescriptor->Ports = new LV2_RDF_Port[rdfDescriptor->PortCount]; - for (uint32_t j = 0; j < rdfDescriptor->PortCount; j++) + for (uint32_t j = 0; j < rdfDescriptor->PortCount; ++j) { Lilv::Port lilvPort(lilvPlugin.get_port_by_index(j)); LV2_RDF_Port* const rdfPort = &rdfDescriptor->Ports[j]; diff --git a/source/utils/Lv2AtomQueue.hpp b/source/utils/Lv2AtomQueue.hpp index 1543642a9..dae659fe8 100644 --- a/source/utils/Lv2AtomQueue.hpp +++ b/source/utils/Lv2AtomQueue.hpp @@ -98,7 +98,7 @@ public: lock(); - for (unsigned short i=0; i < MAX_SIZE; i++) + for (unsigned short i=0; i < MAX_SIZE; ++i) { if (data[i].size == 0) { diff --git a/source/widgets/digitalpeakmeter.cpp b/source/widgets/digitalpeakmeter.cpp index e58e99dba..a2368c98c 100644 --- a/source/widgets/digitalpeakmeter.cpp +++ b/source/widgets/digitalpeakmeter.cpp @@ -87,7 +87,7 @@ void DigitalPeakMeter::setChannels(int channels) fChannelsData = new float[channels]; fLastValueData = new float[channels]; - for (int i=0; i < channels; i++) + for (int i=0; i < channels; ++i) { fChannelsData[i] = 0.0f; fLastValueData[i] = 0.0f; @@ -212,7 +212,7 @@ void DigitalPeakMeter::paintEvent(QPaintEvent* event) painter.setPen(fColorBackground); painter.setBrush(fGradientMeter); - for (int i=0; i < fChannels; i++) + for (int i=0; i < fChannels; ++i) { float value, level = fChannelsData[i]; diff --git a/source/widgets/pixmapkeyboard.cpp b/source/widgets/pixmapkeyboard.cpp index 6c75a00ca..c1af43255 100644 --- a/source/widgets/pixmapkeyboard.cpp +++ b/source/widgets/pixmapkeyboard.cpp @@ -350,7 +350,7 @@ void PixmapKeyboard::paintEvent(QPaintEvent* event) // ------------------------------------------------------------- // Paint clean keys (as background) - for (int octave=0; octave < fOctaves; octave++) + for (int octave=0; octave < fOctaves; ++octave) { QRectF target; @@ -370,7 +370,7 @@ void PixmapKeyboard::paintEvent(QPaintEvent* event) bool paintedWhite = false; - for (int i=0, count=fEnabledKeys.count(); i < count; i++) + for (int i=0, count=fEnabledKeys.count(); i < count; ++i) { int octave, note = fEnabledKeys[i]; const QRectF& pos(_getRectFromMidiNote(note)); @@ -428,7 +428,7 @@ void PixmapKeyboard::paintEvent(QPaintEvent* event) if (paintedWhite) { - for (int octave=0; octave < fOctaves; octave++) + for (int octave=0; octave < fOctaves; ++octave) { foreach (int note, kBlackNotes) { @@ -456,7 +456,7 @@ void PixmapKeyboard::paintEvent(QPaintEvent* event) // ------------------------------------------------------------- // Paint (black) pressed keys - for (int i=0, count=fEnabledKeys.count(); i < count; i++) + for (int i=0, count=fEnabledKeys.count(); i < count; ++i) { int octave, note = fEnabledKeys[i]; const QRectF& pos(_getRectFromMidiNote(note)); @@ -512,7 +512,7 @@ void PixmapKeyboard::paintEvent(QPaintEvent* event) painter.setFont(fFont); painter.setPen(Qt::black); - for (int i=0; i < fOctaves; i++) + for (int i=0; i < fOctaves; ++i) { if (fPixmapMode == HORIZONTAL) painter.drawText(i * 144, 48, 18, 18, Qt::AlignCenter, QString("C%1").arg(i + 2));