From patchwork Mon Jun 8 02:32:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3983 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1BD916002E for ; Mon, 8 Jun 2020 04:32:57 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="AMtrJSAj"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 847752C9 for ; Mon, 8 Jun 2020 04:32:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1591583576; bh=lmjKETXqODtjNLvuPl03/BAqxwL5L/BPDpyHzKOosIA=; h=From:To:Subject:Date:From; b=AMtrJSAj6RBoRapNG7f8a0YlwYnxttpVK+iIELoWeb/vweDILLQSXIrjk3rfxrp82 3o15ROgYgftoHmYgSIu0ecLhSAiG11jTsdQ801la9JAXBc/sNIpPqECowqC5kH0+gh 1x/fPhgBOa0tSQo3A1XBQ5hNW8rcXeQ4dyuGoCsA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 8 Jun 2020 05:32:34 +0300 Message-Id: <20200608023234.7533-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: pipeline: rkisp1: Avoid usage of dynamic_cast<> X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 02:32:57 -0000 The logic of the code guarantees that the PipelineHandler pointer passed to the RkISP1Frames constructor is an instance of PipelineHandlerRkISP1. We can thus use static_cast<> instead of dynamic_cast<>. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index d807fc2cf535..094362bb0e4f 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -221,7 +221,7 @@ private: }; RkISP1Frames::RkISP1Frames(PipelineHandler *pipe) - : pipe_(dynamic_cast(pipe)) + : pipe_(static_cast(pipe)) { }