1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

graph: remove map key test with map size

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2023-01-05 17:05:29 +01:00 committed by Steffen Vogel
parent 33da5e4ff7
commit d5ff9a1b53

View file

@ -42,9 +42,6 @@ public:
std::shared_ptr<VertexType> getVertex(VertexIdentifier vertexId) const
{
if (vertexId >= vertices.size())
throw std::invalid_argument("vertex doesn't exist");
// Cannot use [] operator, because creates non-existing elements
// at() will throw std::out_of_range if element does not exist
return vertices.at(vertexId);