Remove unneccessar branch in CoreCH code

This commit is contained in:
Patrick Niklaus
2017-03-03 13:28:11 +00:00
committed by Patrick Niklaus
parent c2a5cc034a
commit 93cdd8bb46
3 changed files with 2 additions and 11 deletions
@@ -57,8 +57,6 @@ template <> class AlgorithmDataFacade<algorithm::CoreCH>
using EdgeData = contractor::QueryEdge::EdgeData;
virtual bool IsCoreNode(const NodeID id) const = 0;
virtual std::size_t GetCoreSize() const = 0;
};
}
}
@@ -175,15 +175,9 @@ class ContiguousInternalMemoryAlgorithmDataFacade<algorithm::CoreCH>
bool IsCoreNode(const NodeID id) const override final
{
if (m_is_core_node.size() > 0)
{
return m_is_core_node.at(id);
}
return false;
BOOST_ASSERT(id < m_is_core_node.size());
return m_is_core_node[id];
}
std::size_t GetCoreSize() const override final { return m_is_core_node.size(); }
};
/**