@@ -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; | |||
@@ -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; | |||
@@ -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) | |||
{ | |||
@@ -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]; | |||
@@ -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); | |||
@@ -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]; | |||
@@ -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]; | |||
@@ -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); | |||
@@ -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); | |||
@@ -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(); | |||
@@ -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 | |||
@@ -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); | |||
@@ -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; | |||
@@ -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; | |||
@@ -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]; | |||
} | |||
@@ -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; | |||
@@ -34,7 +34,7 @@ App::~App() | |||
void App::idle() | |||
{ | |||
for (std::list<Window*>::iterator it = kPrivate->fWindows.begin(); it != kPrivate->fWindows.end(); it++) | |||
for (std::list<Window*>::iterator it = kPrivate->fWindows.begin(); it != kPrivate->fWindows.end(); ++it) | |||
{ | |||
Window* window = *it; | |||
window->idle(); | |||
@@ -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 | |||
} | |||
@@ -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]); | |||
@@ -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)); | |||
} | |||
} | |||
@@ -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]; | |||
@@ -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); | |||
@@ -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); | |||
@@ -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])) | |||
{ | |||
@@ -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]; | |||
@@ -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) | |||
{ | |||
@@ -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]; | |||
@@ -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)); | |||