From patchwork Fri Dec 20 15:08:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 22433 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 C588BC3272 for ; Fri, 20 Dec 2024 15:08:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 44E16684B0; Fri, 20 Dec 2024 16:08:41 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="HgSvzZg9"; dkim-atps=neutral Received: from mail-10629.protonmail.ch (mail-10629.protonmail.ch [79.135.106.29]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 25088684A5 for ; Fri, 20 Dec 2024 16:08:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734707318; x=1734966518; bh=WKoFjmRvW/VLNW9jHasQCeXJOze+IkFyTDPoeZgW8/U=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=HgSvzZg9ZH4sKuSzstzQ4K7twh54ouE8+iIdMbJfARuV5QGshSb7SnMNI0xRcR3Ny 0QeNNhZTv3a2nn9qUH5Moa2k7yqOaR5i0gGGXBtYxJzktay2AnJpCVhiCEVyxujLHv Px1jUKiaxyu+/q9sq0wp+Jm/K+QAshLcCe8+hQxLgh6pcbrf8+nP2gVuK6iV3y0toU jYqNtU5wvNbfZZhxSkNBh5vNsS7RrslvvKPGuLOhdlR/Y4Ae7GpwZbAwIXIXIkk4Yc 4EvWD9duIwOv/EUf56/N1DEVvXhaQE8mbUT99bKnS1o+lXQTOnEJrc8+3OMUjuUaep pKbsdiXSP8Btw== Date: Fri, 20 Dec 2024 15:08:33 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [RFC PATCH v1 07/12] apps: lc-compliance: Use array instead of `std::vector` Message-ID: <20241220150759.709756-8-pobrn@protonmail.com> In-Reply-To: <20241220150759.709756-1-pobrn@protonmail.com> References: <20241220150759.709756-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 527a818331aa2e1a317dff3b1b0f48ca59ab86d2 MIME-Version: 1.0 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" There is no reason to use `std::vector` for this static data, a simple array will do fine. Signed-off-by: Barnabás Pőcze Reviewed-by: Jacopo Mondi Reviewed-by: Paul Elder --- src/apps/lc-compliance/tests/capture_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp index db196a949..97465a612 100644 --- a/src/apps/lc-compliance/tests/capture_test.cpp +++ b/src/apps/lc-compliance/tests/capture_test.cpp @@ -18,8 +18,9 @@ namespace { using namespace libcamera; -const std::vector NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; -const std::vector ROLES = { +const int NUMREQUESTS[] = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; + +const StreamRole ROLES[] = { StreamRole::Raw, StreamRole::StillCapture, StreamRole::VideoRecording,