From patchwork Tue Sep 29 01:18:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9844 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 E8526C3B5C for ; Tue, 29 Sep 2020 01:19:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6DA34620BC; Tue, 29 Sep 2020 03:19:32 +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="Xm2VWAma"; 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 2F97660365 for ; Tue, 29 Sep 2020 03:19:30 +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 B2768540 for ; Tue, 29 Sep 2020 03:19:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1601342369; bh=Bki8vlpLhLhZ6Ps/34YQ/qfb6XOSkt9HIpNgMnGST4o=; h=From:To:Subject:Date:From; b=Xm2VWAma5p0xZYtscnBHABc0VvCSn1LgYNTTvoyJYh26XQNsCQFYD6BQCkkRcScAR 9kh3ijYZ3DaxkGUmLY1p8d37ix04ZU8wOmfj4an2Kzqes6Fa+uABcVMEah3fEzOMR0 P+6j3soUU9I/I3nRDw6D+lhm96dX76LPluMU8rI4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 29 Sep 2020 04:18:50 +0300 Message-Id: <20200929011850.13997-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: span: Use default copy assignemnt operator 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 custom implementation of the copy assignment operator is identical to the one the compiler would generate. Replace it by the default. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Niklas Söderlund --- include/libcamera/span.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/libcamera/span.h b/include/libcamera/span.h index 738af6aca871..a53a80b81640 100644 --- a/include/libcamera/span.h +++ b/include/libcamera/span.h @@ -188,12 +188,7 @@ public: } constexpr Span(const Span &other) noexcept = default; - - constexpr Span &operator=(const Span &other) noexcept - { - data_ = other.data_; - return *this; - } + constexpr Span &operator=(const Span &other) noexcept = default; constexpr iterator begin() const { return data(); } constexpr const_iterator cbegin() const { return begin(); }