From 302084a06f86747fdeba65a1368e342375957506 Mon Sep 17 00:00:00 2001 From: jvallve <jvallve@iri.upc.edu> Date: Fri, 5 Aug 2022 13:03:58 +0200 Subject: [PATCH] getCapturesOfType returns already derived pointers --- src/processor/processor_loop_closure_icp.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/processor/processor_loop_closure_icp.cpp b/src/processor/processor_loop_closure_icp.cpp index 09d35ccdf..3877c722f 100644 --- a/src/processor/processor_loop_closure_icp.cpp +++ b/src/processor/processor_loop_closure_icp.cpp @@ -85,11 +85,8 @@ std::map<double,MatchLoopClosurePtr> ProcessorLoopClosureIcp::findLoopClosures(C // Frame can have more than one laser capture for (auto cap_ref : frm->getCapturesOfType<CaptureLaser2d>()) { - auto cap_ref_laser = std::dynamic_pointer_cast<CaptureLaser2d>(cap_ref); - assert(cap_ref_laser != nullptr); - // Match Scans - auto match = matchScans(cap_ref_laser, cap_laser); + auto match = matchScans(cap_ref, cap_laser); // IT'S A MATCH! if (match != nullptr) -- GitLab