Skip to content

Commit

Permalink
STYLE: Remove private ObjectFactoryBase member InitializeFactoryList()
Browse files Browse the repository at this point in the history
`ObjectFactoryBase::InitializeFactoryList()` has become unnecessary from
pull request InsightSoftwareConsortium#3641
commit 48d0cb0 "STYLE: Remove pointer
indirection from lists of ObjectFactoryBasePrivate"
  • Loading branch information
N-Dekker authored and dzenanz committed Sep 26, 2023
1 parent ff47f5c commit 82d7060
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions Modules/Core/Common/include/itkObjectFactoryBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,6 @@ class ITKCommon_EXPORT ObjectFactoryBase : public Object

const std::unique_ptr<OverrideMap> m_OverrideMap;

/** Initialize the static list of Factories. */
static void
InitializeFactoryList();

/** Register default factories which are not loaded at run time. */
static void
RegisterInternal();
Expand Down
11 changes: 0 additions & 11 deletions Modules/Core/Common/src/itkObjectFactoryBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,6 @@ ObjectFactoryBase::CreateAllInstance(const char * itkclassname)
return created;
}

/**
* A one time initialization method.
*/
void
ObjectFactoryBase::InitializeFactoryList()
{
itkInitGlobalsMacro(PimplGlobals);
}

/**
* A one time initialization method.
*/
Expand All @@ -240,7 +231,6 @@ ObjectFactoryBase::Initialize()
// Atomically set m_Initialized to true. If it was false before, enter the if.
if (!m_PimplGlobals->m_Initialized.exchange(true))
{
ObjectFactoryBase::InitializeFactoryList();
ObjectFactoryBase::RegisterInternal();
#if defined(ITK_DYNAMIC_LOADING) && !defined(ITK_WRAPPING)
ObjectFactoryBase::LoadDynamicFactories();
Expand Down Expand Up @@ -520,7 +510,6 @@ ObjectFactoryBase::RegisterFactoryInternal(ObjectFactoryBase * factory)
// Do not call general ::Initialize() method as that may invoke additional
// libraries to be loaded and this method is called during static
// initialization.
ObjectFactoryBase::InitializeFactoryList();
m_PimplGlobals->m_InternalFactories.push_back(factory);
factory->Register();
// if the internal factories have already been register add this one too
Expand Down

0 comments on commit 82d7060

Please sign in to comment.