From fc9bb23711cffca11fc594f125decb2271ff49c5 Mon Sep 17 00:00:00 2001 From: jthedering <51533355+jthedering@users.noreply.github.com> Date: Sun, 18 Jun 2017 13:01:21 +0000 Subject: [PATCH] Fixed: Formatting was not applied for some files --- Benchmark/Benchmark.cpp | 18 +++++++------- Editor/AnalysisPlotScene.cpp | 1 - Editor/CustomStyle.cpp | 2 +- Editor/CustomStyle.h | 32 ++++++++++++------------- Editor/FilterTableMimeData.cpp | 1 - Editor/IFilterGUI.cpp | 2 -- Editor/IFilterGUIFactory.cpp | 1 - Editor/guis/VSTPluginFilterGUIFactory.h | 26 ++++++++++---------- Editor/helpers/DPIHelper.h | 26 ++++++++++---------- Editor/widgets/ChannelGraphScene.h | 1 - Editor/widgets/ExponentialSpinBox.cpp | 1 - reformat.bat | 2 +- 12 files changed, 53 insertions(+), 60 deletions(-) diff --git a/Benchmark/Benchmark.cpp b/Benchmark/Benchmark.cpp index dba2625..b921be1 100644 --- a/Benchmark/Benchmark.cpp +++ b/Benchmark/Benchmark.cpp @@ -169,14 +169,14 @@ int main(int argc, char** argv) engine.initialize((float)sampleRate, channelCount, channelCount, channelCount, channelMask, batchsize); double initTime = timer.stop(); - if(!verbose) + if (!verbose) printf("\nLoading configuration took %g ms\n", initTime * 1000.0); printf("\nProcessing %d frames from %d channel(s)\n", frameCount, channelCount); timer.start(); - for(unsigned i = 0; i < frameCount; i += batchsize) + for (unsigned i = 0; i < frameCount; i += batchsize) { engine.process(buf2 + i * channelCount, buf + i * channelCount, min(batchsize, frameCount - i)); } @@ -188,22 +188,22 @@ int main(int argc, char** argv) unsigned clipCount = 0; float max = 0; - for(unsigned i = 0; i < frameCount * channelCount; i++) + for (unsigned i = 0; i < frameCount * channelCount; i++) { float f = fabs(buf2[i]); - if(f > max) + if (f > max) max = f; - if(f > 1.0f) + if (f > 1.0f) clipCount++; } printf("Max output level: %f (%f dB)", max, log10(max) * 20.0f); - if(clipCount > 0) + if (clipCount > 0) printf(" (%d samples clipped!)", clipCount); printf("\n"); string output = outputArg.getValue(); - if(output == "") + if (output == "") { char temp[255]; GetTempPathA(sizeof(temp) / sizeof(wchar_t), temp); @@ -216,14 +216,14 @@ int main(int argc, char** argv) SF_INFO info = {frameCount, (int)sampleRate, (int)channelCount, SF_FORMAT_WAV | SF_FORMAT_PCM_16, 0}; SNDFILE* outFile = sf_open(output.c_str(), SFM_WRITE, &info); - if(outFile == NULL) + if (outFile == NULL) { fprintf(stderr, "%s", sf_strerror(outFile)); return 1; } sf_count_t numWritten = 0; - while(numWritten < frameCount) + while (numWritten < frameCount) numWritten += sf_writef_float(outFile, buf2 + numWritten * channelCount, frameCount - numWritten); sf_close(outFile); diff --git a/Editor/AnalysisPlotScene.cpp b/Editor/AnalysisPlotScene.cpp index f573c8d..bcb06e9 100644 --- a/Editor/AnalysisPlotScene.cpp +++ b/Editor/AnalysisPlotScene.cpp @@ -25,7 +25,6 @@ using namespace std; AnalysisPlotScene::AnalysisPlotScene(QObject* parent) : FrequencyPlotScene(parent) { - } void AnalysisPlotScene::setFreqData(fftwf_complex* freqData, int frameCount, unsigned sampleRate) diff --git a/Editor/CustomStyle.cpp b/Editor/CustomStyle.cpp index 3fdc888..d5df9c0 100644 --- a/Editor/CustomStyle.cpp +++ b/Editor/CustomStyle.cpp @@ -20,7 +20,7 @@ #include "Editor/helpers/DPIHelper.h" CustomStyle::CustomStyle(QStyle* style) - : QProxyStyle(style) + : QProxyStyle(style) { } diff --git a/Editor/CustomStyle.h b/Editor/CustomStyle.h index ac2193b..1b8c282 100644 --- a/Editor/CustomStyle.h +++ b/Editor/CustomStyle.h @@ -1,20 +1,20 @@ /* - This file is part of EqualizerAPO, a system-wide equalizer. - Copyright (C) 2016 Jonas Thedering + This file is part of EqualizerAPO, a system-wide equalizer. + Copyright (C) 2016 Jonas Thedering - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once @@ -23,10 +23,10 @@ class CustomStyle : public QProxyStyle { - Q_OBJECT + Q_OBJECT public: - CustomStyle(QStyle* style); + CustomStyle(QStyle* style); - int pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override; + int pixelMetric(PixelMetric metric, const QStyleOption* option, const QWidget* widget) const override; }; diff --git a/Editor/FilterTableMimeData.cpp b/Editor/FilterTableMimeData.cpp index 579fd6e..5491212 100644 --- a/Editor/FilterTableMimeData.cpp +++ b/Editor/FilterTableMimeData.cpp @@ -21,7 +21,6 @@ FilterTableMimeData::FilterTableMimeData() { - } QList FilterTableMimeData::getPrefsList() const diff --git a/Editor/IFilterGUI.cpp b/Editor/IFilterGUI.cpp index b365db1..2def957 100644 --- a/Editor/IFilterGUI.cpp +++ b/Editor/IFilterGUI.cpp @@ -22,10 +22,8 @@ IFilterGUI::IFilterGUI(QWidget* parent) : QWidget(parent) { - } IFilterGUI::~IFilterGUI() { - } diff --git a/Editor/IFilterGUIFactory.cpp b/Editor/IFilterGUIFactory.cpp index 78b6f0f..6681918 100644 --- a/Editor/IFilterGUIFactory.cpp +++ b/Editor/IFilterGUIFactory.cpp @@ -21,5 +21,4 @@ IFilterGUIFactory::~IFilterGUIFactory() { - } diff --git a/Editor/guis/VSTPluginFilterGUIFactory.h b/Editor/guis/VSTPluginFilterGUIFactory.h index a5e2881..9c884d8 100644 --- a/Editor/guis/VSTPluginFilterGUIFactory.h +++ b/Editor/guis/VSTPluginFilterGUIFactory.h @@ -1,20 +1,20 @@ /* - This file is part of Equalizer APO, a system-wide equalizer. - Copyright (C) 2017 Jonas Thedering + This file is part of Equalizer APO, a system-wide equalizer. + Copyright (C) 2017 Jonas Thedering - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once diff --git a/Editor/helpers/DPIHelper.h b/Editor/helpers/DPIHelper.h index 0fbf3c2..da9193b 100644 --- a/Editor/helpers/DPIHelper.h +++ b/Editor/helpers/DPIHelper.h @@ -1,20 +1,20 @@ /* - This file is part of EqualizerAPO, a system-wide equalizer. - Copyright (C) 2016 Jonas Thedering + This file is part of EqualizerAPO, a system-wide equalizer. + Copyright (C) 2016 Jonas Thedering - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include diff --git a/Editor/widgets/ChannelGraphScene.h b/Editor/widgets/ChannelGraphScene.h index 21e7344..488e620 100644 --- a/Editor/widgets/ChannelGraphScene.h +++ b/Editor/widgets/ChannelGraphScene.h @@ -29,5 +29,4 @@ public: protected: QPointF getNextChannelPoint(QGraphicsItem* lastItem, bool output); - }; diff --git a/Editor/widgets/ExponentialSpinBox.cpp b/Editor/widgets/ExponentialSpinBox.cpp index 8e1f1cb..b348ac3 100644 --- a/Editor/widgets/ExponentialSpinBox.cpp +++ b/Editor/widgets/ExponentialSpinBox.cpp @@ -25,7 +25,6 @@ using namespace std; ExponentialSpinBox::ExponentialSpinBox(QWidget* parent) : QSpinBox(parent) { - } void ExponentialSpinBox::stepBy(int steps) diff --git a/reformat.bat b/reformat.bat index dc32f2b..3013863 100644 --- a/reformat.bat +++ b/reformat.bat @@ -1,7 +1,7 @@ @echo off cd %~dp0 for /r %%f in (*.cpp *.h) do ( - (Echo "%%f" | FIND /I "\build-" 1>NUL) || (Echo "%%f" | FIND /I "\resource.h" 1>NUL) || (Echo "%%f" | FIND /I "\libHybridConv-0.1.1\" 1>NUL) || ( + (Echo "%%f" | FIND /I "\build-" 1>NUL) || (Echo "%%f" | FIND /I "\resource.h" 1>NUL) || (Echo "%%f" | FIND /I "\libHybridConv-0.1.1\" 1>NUL) || (Echo "%%f" | FIND /I "\helpers\aeffectx.h" 1>NUL) || (Echo "%%f" | FIND /I "\helpers\UncaughtExceptions.h" 1>NUL) || (Echo "%%f" | FIND /I "\VoicemeeterClient\VoicemeeterRemote.h" 1>NUL) || ( uncrustify -c uncrustify.cfg -l CPP --no-backup "%%f" ) )