diff --git a/include/core/frame/frame_base.h b/include/core/frame/frame_base.h index cb1f99ce9b03c4b490148ff7de93394cd4c66d21..0f0271a1b12733b5e37dce59061af22c497e7daf 100644 --- a/include/core/frame/frame_base.h +++ b/include/core/frame/frame_base.h @@ -294,7 +294,7 @@ inline std::shared_ptr<const C> FrameBase::getCaptureOfType() const { for (auto capture_ptr : getCaptureList()) { - auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr); + auto cap_derived = std::dynamic_pointer_cast<const C>(capture_ptr); if (cap_derived) return cap_derived; } @@ -319,7 +319,7 @@ inline std::list<std::shared_ptr<const C>> FrameBase::getCapturesOfType() const std::list<std::shared_ptr<const C>> captures; for (auto capture_ptr : getCaptureList()) { - auto cap_derived = std::dynamic_pointer_cast<C>(capture_ptr); + auto cap_derived = std::dynamic_pointer_cast<const C>(capture_ptr); if (cap_derived) captures.push_back(cap_derived); }