Commit 2c5ba0ef authored by David Thompson's avatar David Thompson
Browse files

WIP: Keep up with changes to cmb/smtk!2632.

parent af973a80
......@@ -67,11 +67,11 @@ protected:
template<typename Modifier>
bool Resource::modifyComponent(Component& component, const Modifier& modifier)
{
auto& nodesById = NodeStorage::m_nodes.get<detail::IdTag>();
auto& nodesById = NodeContainer::m_nodes.get<detail::IdTag>();
auto it = nodesById.find(component.id());
if (it != nodesById.end())
{
NodeStorage::m_nodes.modify(it, modifier);
NodeContainer::m_nodes.modify(it, modifier);
return true;
}
return false;
......
......@@ -110,7 +110,7 @@ struct SMTKMARKUP_EXPORT Traits
ParentsAs<Edge>, Parents>
ArcTypes;
*/
using NodeStorage = detail::NodeContainer;
using NodeContainer = detail::NodeContainer;
};
}
}
......
......@@ -30,9 +30,9 @@ smtk::resource::ComponentPtr NodeContainer::find(const smtk::common::UUID& uuid)
return result;
}
bool NodeContainer::eraseNode(const smtk::resource::ComponentPtr& node)
std::size_t NodeContainer::eraseNodes(const smtk::resource::ComponentPtr& node)
{
bool didErase = false;
std::size_t didErase = 0;
auto graphNode = std::dynamic_pointer_cast<Component>(node);
if (!graphNode)
{
......@@ -43,7 +43,7 @@ bool NodeContainer::eraseNode(const smtk::resource::ComponentPtr& node)
if (it != nodesById.end())
{
nodesById.erase(node->id());
didErase = true;
didErase = 1;
}
return didErase;
}
......
......@@ -84,7 +84,7 @@ protected:
* re-insertion in cases where \a node data that is indexed must be changed.
* In that case, arcs must not be modified.
*/
bool eraseNode(const smtk::resource::ComponentPtr& node);
std::size_t eraseNodes(const smtk::resource::ComponentPtr& node);
/**\brief Unconditionally insert the given \a node into the container.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment