From 1bef6dfe4b1e4fba4890dee697f1523b8018eda0 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Fri, 17 Feb 2023 00:13:47 +0100 Subject: [PATCH] STYLE: Default default-constructor of VariableLengthVector --- Modules/Core/Common/include/itkVariableLengthVector.h | 4 ++-- Modules/Core/Common/include/itkVariableLengthVector.hxx | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Modules/Core/Common/include/itkVariableLengthVector.h b/Modules/Core/Common/include/itkVariableLengthVector.h index 36998fcbbf95..51d4e0a58edb 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.h +++ b/Modules/Core/Common/include/itkVariableLengthVector.h @@ -322,7 +322,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector * \post \c m_NumElements is 0 * \post \c m_LetArrayManageMemory is true */ - VariableLengthVector(); + VariableLengthVector() = default; /** Constructor with size. * Size can only be changed by assignment, \c SetSize() or \c Reserve(). @@ -978,7 +978,7 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector private: bool m_LetArrayManageMemory{ true }; // if true, the array is responsible // for memory of data - TValue * m_Data; // Array to hold data + TValue * m_Data{}; // Array to hold data ElementIdentifier m_NumElements{ 0 }; }; diff --git a/Modules/Core/Common/include/itkVariableLengthVector.hxx b/Modules/Core/Common/include/itkVariableLengthVector.hxx index 5da5109deed6..c8b6626fc44e 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.hxx +++ b/Modules/Core/Common/include/itkVariableLengthVector.hxx @@ -27,12 +27,6 @@ namespace itk { -template -VariableLengthVector::VariableLengthVector() - : m_Data(nullptr) - -{} - template VariableLengthVector::VariableLengthVector(unsigned int length) : m_Data(nullptr)