From a78542ef0d96a8a28859a06fe2e6d4757eb6052d Mon Sep 17 00:00:00 2001 From: jthedering <51533355+jthedering@users.noreply.github.com> Date: Sun, 18 Jun 2017 19:04:27 +0000 Subject: [PATCH] Fixed: Formatting after delete[]. A recent version of Uncrustify is needed for the new uncrustify.cfg. --- Benchmark/Benchmark.cpp | 4 ++-- Editor/guis/GraphicEQFilterGUI.cpp | 8 ++++---- Editor/guis/GraphicEQFilterGUIItem.cpp | 1 - FilterEngine.cpp | 2 +- filters/ConvolutionFilter.cpp | 2 +- helpers/LogHelper.cpp | 4 ++-- helpers/VSTPluginInstance.cpp | 4 ++-- uncrustify.cfg | 3 ++- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Benchmark/Benchmark.cpp b/Benchmark/Benchmark.cpp index b921be1..011b5fd 100644 --- a/Benchmark/Benchmark.cpp +++ b/Benchmark/Benchmark.cpp @@ -229,8 +229,8 @@ int main(int argc, char** argv) sf_close(outFile); outFile = NULL; - delete[]buf; - delete[]buf2; + delete[] buf; + delete[] buf2; } if (!noPauseArg.getValue()) diff --git a/Editor/guis/GraphicEQFilterGUI.cpp b/Editor/guis/GraphicEQFilterGUI.cpp index 26317dc..6e592fc 100644 --- a/Editor/guis/GraphicEQFilterGUI.cpp +++ b/Editor/guis/GraphicEQFilterGUI.cpp @@ -66,11 +66,11 @@ GraphicEQFilterGUI::GraphicEQFilterGUI(GraphicEQFilter* filter, QString configPa ui->toolBar->addAction(ui->actionNormalizeResponse); ui->toolBar->addAction(ui->actionResetResponse); - connect(scene, SIGNAL(nodeInserted(int, double, double)), this, SLOT(insertRow(int, double, double))); + connect(scene, SIGNAL(nodeInserted(int,double,double)), this, SLOT(insertRow(int,double,double))); connect(scene, SIGNAL(nodeRemoved(int)), this, SLOT(removeRow(int))); - connect(scene, SIGNAL(nodeUpdated(int, double, double)), this, SLOT(updateRow(int, double, double))); - connect(scene, SIGNAL(nodeMoved(int, int)), this, SLOT(moveRow(int, int))); - connect(scene, SIGNAL(nodeSelectionChanged(int, bool)), this, SLOT(selectRow(int, bool))); + connect(scene, SIGNAL(nodeUpdated(int,double,double)), this, SLOT(updateRow(int,double,double))); + connect(scene, SIGNAL(nodeMoved(int,int)), this, SLOT(moveRow(int,int))); + connect(scene, SIGNAL(nodeSelectionChanged(int,bool)), this, SLOT(selectRow(int,bool))); connect(scene, SIGNAL(updateModel()), this, SIGNAL(updateModel())); scene->setNodes(filter->getNodes()); diff --git a/Editor/guis/GraphicEQFilterGUIItem.cpp b/Editor/guis/GraphicEQFilterGUIItem.cpp index 0a2b8ae..24991ca 100644 --- a/Editor/guis/GraphicEQFilterGUIItem.cpp +++ b/Editor/guis/GraphicEQFilterGUIItem.cpp @@ -102,4 +102,3 @@ void GraphicEQFilterGUIItem::setIndex(int value) { index = value; } - diff --git a/FilterEngine.cpp b/FilterEngine.cpp index af6106a..7bb7c58 100644 --- a/FilterEngine.cpp +++ b/FilterEngine.cpp @@ -111,7 +111,7 @@ FilterEngine::~FilterEngine() cleanupConfigurations(); for (vector::iterator it = factories.begin(); it != factories.end(); it++) - delete*it; + delete *it; delete parser; CloseHandle(loadSemaphore); diff --git a/filters/ConvolutionFilter.cpp b/filters/ConvolutionFilter.cpp index b781fb2..2321d41 100644 --- a/filters/ConvolutionFilter.cpp +++ b/filters/ConvolutionFilter.cpp @@ -95,7 +95,7 @@ vector ConvolutionFilter::initialize(float sampleRate, unsigned maxFram for (unsigned i = 0; i < fileChannelCount; i++) { - delete[]bufs[i]; + delete[] bufs[i]; } delete bufs; delete interleavedBuf; diff --git a/helpers/LogHelper.cpp b/helpers/LogHelper.cpp index b01e934..143f3cc 100644 --- a/helpers/LogHelper.cpp +++ b/helpers/LogHelper.cpp @@ -77,9 +77,9 @@ void LogHelper::log(const char* file, int line, const void* caller, bool trace, { HANDLE con = GetStdHandle(STD_OUTPUT_HANDLE); if (trace) - SetConsoleTextAttribute(con, 2); // Set console color to green + SetConsoleTextAttribute(con, 2);// Set console color to green else - SetConsoleTextAttribute(con, 12); // Set console color to red + SetConsoleTextAttribute(con, 12);// Set console color to red } if (!compact) diff --git a/helpers/VSTPluginInstance.cpp b/helpers/VSTPluginInstance.cpp index e6a9366..547c0cf 100644 --- a/helpers/VSTPluginInstance.cpp +++ b/helpers/VSTPluginInstance.cpp @@ -262,7 +262,7 @@ void VSTPluginInstance::writeToEffect(const std::wstring& chunkData, const std:: BYTE* buf = new BYTE[bufSize]; if (CryptStringToBinaryW(chunkData.c_str(), 0, CRYPT_STRING_BASE64, buf, &bufSize, NULL, NULL) == TRUE) effect->dispatcher(effect, effSetChunk, 1, bufSize, buf, 0.0f); - delete[]buf; + delete[] buf; } } else @@ -296,7 +296,7 @@ void VSTPluginInstance::readFromEffect(std::wstring& chunkData, std::unordered_m wchar_t* string = new wchar_t[stringLength]; if (CryptBinaryToStringW(chunk, size, CRYPT_STRING_BASE64 | CRYPT_STRING_NOCRLF, string, &stringLength) == TRUE) chunkData = string; - delete[]string; + delete[] string; } else { diff --git a/uncrustify.cfg b/uncrustify.cfg index 39ce205..86d550e 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -257,7 +257,8 @@ sp_after_for_colon=add sp_before_for_colon=add sp_cmt_cpp_start=add sp_endif_cmt=add -sp_after_new=remove +sp_after_new=add +sp_between_new_paren=remove sp_before_tr_emb_cmt=add nl_fcall_brace=add nl_enum_brace=add