From 50ba81ffe42491a71a7e34576920a1bbd4e7ca2c Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Wed, 29 Dec 2021 17:45:24 +0100 Subject: [PATCH] STYLE: Remove remaining `void` from empty function parameter lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Did check all itk*.cxx, itk*.h, and itk*.hxx source files. Follow-up to: "STYLE: removing void if used in place of empty parameter list" by Dženan Zukić, 11 September 2018 https://github.com/InsightSoftwareConsortium/ITK/commit/60807f4abcfd7c4d42ddf93796d6acf272aa442b "STYLE: Remove redundant void argument lists" by Hans Johnson, 20 February 2020 pull request https://github.com/InsightSoftwareConsortium/ITK/pull/1628 https://github.com/InsightSoftwareConsortium/ITK/commit/e6d859ecae955a4e2a44b9e60677093dc254a4ca --- Modules/Core/Common/include/itkSingleton.h | 9 ++++----- Modules/Core/Common/src/itkSingleton.cxx | 2 +- Modules/Core/Common/src/itkStreamingProcessObject.cxx | 2 +- .../Filtering/FFT/include/itkInverse1DFFTImageFilter.h | 2 +- Modules/Numerics/Optimizers/src/itkSPSAOptimizer.cxx | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Modules/Core/Common/include/itkSingleton.h b/Modules/Core/Common/include/itkSingleton.h index 4645a22300a..25c28692c1c 100644 --- a/Modules/Core/Common/include/itkSingleton.h +++ b/Modules/Core/Common/include/itkSingleton.h @@ -47,8 +47,7 @@ class ITKCommon_EXPORT SingletonIndex public: /** Standard class types. */ using Self = SingletonIndex; - using SingletonData = - std::map, std::function>>; + using SingletonData = std::map, std::function>>; // obtain a global registered in the singleton index under the // globalName, if unknown then nullptr will be returned. @@ -69,7 +68,7 @@ class ITKCommon_EXPORT SingletonIndex SetGlobalInstance(const char * globalName, T * global, std::function func, - std::function deleteFunc) + std::function deleteFunc) { return this->SetGlobalInstancePrivate(globalName, global, func, deleteFunc); } @@ -97,7 +96,7 @@ class ITKCommon_EXPORT SingletonIndex SetGlobalInstancePrivate(const char * globalName, void * global, std::function func, - std::function deleteFunc); + std::function deleteFunc); /** The static GlobalSingleton. This is initialized to nullptr as the first * stage of static initialization. It is then populated on the first call to @@ -112,7 +111,7 @@ class ITKCommon_EXPORT SingletonIndex // A wrapper for a global variable registered in the singleton index. template T * -Singleton(const char * globalName, std::function func, std::function deleteFunc) +Singleton(const char * globalName, std::function func, std::function deleteFunc) { static SingletonIndex * singletonIndex = SingletonIndex::GetInstance(); Unused(singletonIndex); diff --git a/Modules/Core/Common/src/itkSingleton.cxx b/Modules/Core/Common/src/itkSingleton.cxx index 82e30e2c9ae..da24de9c235 100644 --- a/Modules/Core/Common/src/itkSingleton.cxx +++ b/Modules/Core/Common/src/itkSingleton.cxx @@ -102,7 +102,7 @@ bool SingletonIndex::SetGlobalInstancePrivate(const char * globalName, void * global, std::function func, - std::function deleteFunc) + std::function deleteFunc) { m_GlobalObjects.erase(globalName); m_GlobalObjects.insert(std::make_pair(globalName, std::make_tuple(global, func, deleteFunc))); diff --git a/Modules/Core/Common/src/itkStreamingProcessObject.cxx b/Modules/Core/Common/src/itkStreamingProcessObject.cxx index dd931851f81..0ec0305a019 100644 --- a/Modules/Core/Common/src/itkStreamingProcessObject.cxx +++ b/Modules/Core/Common/src/itkStreamingProcessObject.cxx @@ -206,7 +206,7 @@ StreamingProcessObject::ResetPipeline() } -StreamingProcessObject::StreamingProcessObject(void) = default; +StreamingProcessObject::StreamingProcessObject() = default; StreamingProcessObject::~StreamingProcessObject() = default; diff --git a/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.h b/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.h index 4ef62292908..cf525d26335 100644 --- a/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkInverse1DFFTImageFilter.h @@ -60,7 +60,7 @@ class ITK_TEMPLATE_EXPORT Inverse1DFFTImageFilter : public ImageToImageFilterSuperclass::GetValue(parameters);