Skip to content

Commit

Permalink
STYLE: Simply assign factories, in ObjectFactoryBase::RegisterInternal()
Browse files Browse the repository at this point in the history
Replaced `clear` and `push_back` calls with a simple `std::list` assignment to
`m_RegisteredFactories`.
  • Loading branch information
N-Dekker authored and dzenanz committed Oct 4, 2023
1 parent 75b9967 commit 2859d67
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Modules/Core/Common/src/itkObjectFactoryBase.cxx
Expand Up @@ -249,14 +249,9 @@ ObjectFactoryBase::RegisterInternal()

// Guarantee that no internal factories have already been registered.
itkAssertInDebugAndIgnoreInReleaseMacro(m_PimplGlobals->m_RegisteredFactories.empty());
m_PimplGlobals->m_RegisteredFactories.clear();

// Register all factories registered by the
// "RegisterFactoryInternal" method
for (auto & internalFactory : m_PimplGlobals->m_InternalFactories)
{
m_PimplGlobals->m_RegisteredFactories.push_back(internalFactory);
}
// Register all factories registered by the "RegisterFactoryInternal" method
m_PimplGlobals->m_RegisteredFactories = m_PimplGlobals->m_InternalFactories;
}

/**
Expand Down

0 comments on commit 2859d67

Please sign in to comment.