From 35a15c26dc6155b37aa8632488a8d6e7c71e748a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20Haitz=20Legarreta=20Gorro=C3=B1o?= Date: Sun, 16 Jul 2023 17:20:44 -0400 Subject: [PATCH] DOC: Avoid using initialization lists in coding style snippets Avoid using initialization lists in coding style code snippets: initialization lists are not encouraged as per current ITK style guidelines. Similarly, avoid using a boolean ivar setter method in the constructor, as ivars should be initialized when they are declared. --- SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex b/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex index 984e4d48..f16e0431 100644 --- a/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex +++ b/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex @@ -2241,14 +2241,9 @@ \subsection{White Spaces} \begin{minted}[baselinestretch=1,fontsize=\footnotesize,linenos=false,bgcolor=ltgray]{cpp} template SpecializedFilter::SpecializedFilter() - : m_ForegroundValue(NumericTraits::max()) - , m_BackgroundValue{} - , m_NumPixelComponents(0) - , m_NoiseSigmaIsSet(false) - , m_SearchSpaceList(ListAdaptorType::New()) { - // By default, turn off automatic kernel bandwidth sigma estimation - this->KernelBandwidthEstimationOff(); + // The filter requires two inputs + this->SetNumberOfRequiredInputs(2); } \end{minted} \normalsize