From patchwork Sun Sep 26 21:21:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 13941 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A8176BDC71 for ; Sun, 26 Sep 2021 21:21:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2DF0869195; Sun, 26 Sep 2021 23:21:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="M7brjBzh"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 63C9F6918C for ; Sun, 26 Sep 2021 23:21:17 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F0281BB0 for ; Sun, 26 Sep 2021 23:21:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632691277; bh=OEAu3s59Esl9Hv3rq2npQpPU9I+SGmsN7uKL2PgUk7g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M7brjBzhOm4E6dLgCKToeymFDM0emZNXrhdFV8mtEOKvSnL9a0giHBPvsa6tQWQV/ iO67jspXSK7FKIqf03c27Bz4e6wTci5kn0U/s2AWl4x92LMgv1rERWMtZ82/dHab9W VVJsE1FWNZJeb58Jise0QF6KfUi4Nw2WMx4DAeDc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Sep 2021 00:21:07 +0300 Message-Id: <20210926212108.22510-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210926212108.22510-1-laurent.pinchart@ideasonboard.com> References: <20210926212108.22510-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] Documentation: application-developer: Use correct type to store size 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The return type of std::vector::size() is size_t. Use the same type, instead of unsigned int, to store its return value when retrieving the number of allocated buffers. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- Documentation/guides/application-developer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index 3de13060db08..41a7d88369be 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -278,7 +278,7 @@ as the parameter of the ``FrameBufferAllocator::buffers()`` function. return -ENOMEM; } - unsigned int allocated = allocator->buffers(cfg.stream()).size(); + size_t allocated = allocator->buffers(cfg.stream()).size(); std::cout << "Allocated " << allocated << " buffers for stream" << std::endl; }