From b92f64f582f498dee40ecc6a6761c8b79cda37c0 Mon Sep 17 00:00:00 2001 From: Maxime CLEMENT <78338830+maxime-clem@users.noreply.github.com> Date: Fri, 17 May 2024 11:29:48 +0900 Subject: [PATCH] perf(lanelet2_extension): use std::unordered_set<>::find instead of std::find (#244) perf(exists): use std::unordered_set<>::find instead of std::find Signed-off-by: Maxime CLEMENT --- tmp/lanelet2_extension/lib/visualization.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmp/lanelet2_extension/lib/visualization.cpp b/tmp/lanelet2_extension/lib/visualization.cpp index 0c48008c..7ae33727 100644 --- a/tmp/lanelet2_extension/lib/visualization.cpp +++ b/tmp/lanelet2_extension/lib/visualization.cpp @@ -40,7 +40,7 @@ namespace template bool exists(const std::unordered_set & set, const T & element) { - return std::find(set.begin(), set.end(), element) != set.end(); + return set.find(element) != set.end(); } void adjacentPoints(