From patchwork Tue Jan 13 00:07:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 25721 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 D54B0C323E for ; Tue, 13 Jan 2026 00:08:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB73661FA0; Tue, 13 Jan 2026 01:08:33 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MuL46d3p"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 667B761FA0 for ; Tue, 13 Jan 2026 01:08:31 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi [81.175.209.152]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id B576B50A for ; Tue, 13 Jan 2026 01:08:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768262885; bh=PAtzAHaKdBlO6Tkd0aWC59iMcw81Se8BXhuUX59gAIk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MuL46d3ptVlny98mAm5UMMgwd5opEw6Ny0wqC7Iu3Gv4b19C9vpjSVEp3lX7THPnu 7gic0j8FrWsXF0thMziywilqLYhGGdsEGdLnwurnLMJ2hffnUJ2WQ40vAiP4LgpJbk 5B3V9NRLVo4FBwSEv7j7BkIcQD5OLawFVayxKzyU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 01/36] libcamera: Drop unneeded usage of this pointer Date: Tue, 13 Jan 2026 02:07:33 +0200 Message-ID: <20260113000808.15395-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20260113000808.15395-1-laurent.pinchart@ideasonboard.com> References: <20260113000808.15395-1-laurent.pinchart@ideasonboard.com> 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" A few unneeded usages of the this pointer to quality access to class members have been introduced over time. Drop them. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze --- include/libcamera/internal/shared_mem_object.h | 4 ++-- src/libcamera/camera_manager.cpp | 2 +- src/libcamera/shared_mem_object.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libcamera/internal/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h index e9f1dacd731d..21e025513fdf 100644 --- a/include/libcamera/internal/shared_mem_object.h +++ b/include/libcamera/internal/shared_mem_object.h @@ -79,7 +79,7 @@ public: SharedMemObject(SharedMemObject &&rhs) : SharedMem(std::move(rhs)) { - this->obj_ = rhs.obj_; + obj_ = rhs.obj_; rhs.obj_ = nullptr; } @@ -92,7 +92,7 @@ public: SharedMemObject &operator=(SharedMemObject &&rhs) { SharedMem::operator=(std::move(rhs)); - this->obj_ = rhs.obj_; + obj_ = rhs.obj_; rhs.obj_ = nullptr; return *this; } diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp index 23185467ba02..fc6e490bc476 100644 --- a/src/libcamera/camera_manager.cpp +++ b/src/libcamera/camera_manager.cpp @@ -41,7 +41,7 @@ LOG_DEFINE_CATEGORY(Camera) CameraManager::Private::Private() : Thread("CameraManager"), initialized_(false) { - ipaManager_ = std::make_unique(this->configuration()); + ipaManager_ = std::make_unique(configuration()); } int CameraManager::Private::start() diff --git a/src/libcamera/shared_mem_object.cpp b/src/libcamera/shared_mem_object.cpp index d9b61d37dd43..6edab045d47e 100644 --- a/src/libcamera/shared_mem_object.cpp +++ b/src/libcamera/shared_mem_object.cpp @@ -80,8 +80,8 @@ SharedMem::SharedMem(const std::string &name, std::size_t size) */ SharedMem::SharedMem(SharedMem &&rhs) { - this->fd_ = std::move(rhs.fd_); - this->mem_ = rhs.mem_; + fd_ = std::move(rhs.fd_); + mem_ = rhs.mem_; rhs.mem_ = {}; } @@ -109,8 +109,8 @@ SharedMem::~SharedMem() */ SharedMem &SharedMem::operator=(SharedMem &&rhs) { - this->fd_ = std::move(rhs.fd_); - this->mem_ = rhs.mem_; + fd_ = std::move(rhs.fd_); + mem_ = rhs.mem_; rhs.mem_ = {}; return *this; }