Skip to content

Commit

Permalink
STYLE: Default default-constructor SimpleDataObjectDecorator
Browse files Browse the repository at this point in the history
Removed obsolete "-Wmaybe-uninitialized" and Purify UMR (uninitialized memory
read) workarounds.
  • Loading branch information
N-Dekker authored and dzenanz committed Apr 24, 2023
1 parent 788e558 commit 7a89717
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkSimpleDataObjectDecorator.h
Expand Up @@ -100,7 +100,7 @@ class ITK_TEMPLATE_EXPORT SimpleDataObjectDecorator : public DataObject
}

protected:
SimpleDataObjectDecorator();
SimpleDataObjectDecorator() = default;
~SimpleDataObjectDecorator() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
Expand Down
19 changes: 0 additions & 19 deletions Modules/Core/Common/include/itkSimpleDataObjectDecorator.hxx
Expand Up @@ -32,25 +32,6 @@

namespace itk
{
/**
*
*/
template <typename T>
SimpleDataObjectDecorator<T>::SimpleDataObjectDecorator()
{
#if defined(__GNUC__) && (__GNUC__ > 6)
ITK_GCC_PRAGMA_DIAG_PUSH()
ITK_GCC_PRAGMA_DIAG(ignored "-Wmaybe-uninitialized")
#endif // defined( __GNUC__ ) && ( __GNUC__ > 6 )
this->m_Component = ComponentType(); // initialize here to avoid Purify UMR
#if defined(__GNUC__) && (__GNUC__ > 6)
ITK_GCC_PRAGMA_DIAG_POP()
#endif // defined( __GNUC__ ) && ( __GNUC__ > 6 )
this->m_Initialized = false; // Still needed since not all objects
// are initialized at construction time.
// for example the itkArray.
}

/**
*
*/
Expand Down

0 comments on commit 7a89717

Please sign in to comment.