From patchwork Tue Nov 23 22:40:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 14741 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 AF87CBF415 for ; Tue, 23 Nov 2021 22:40:38 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 56FB56038A; Tue, 23 Nov 2021 23:40:38 +0100 (CET) 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="mGoxogvE"; 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 764B16042A for ; Tue, 23 Nov 2021 23:40:23 +0100 (CET) Received: from Monstersaurus.ksquared.org.uk.beta.tailscale.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 243BAF95; Tue, 23 Nov 2021 23:40:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1637707223; bh=15g54kN9lxh84FsgjeP2E37dVZITLhUofjNkYenL8L8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mGoxogvEp4HV6MC5eQAlwmSu2oiEcgmtsecFNcOxYlRuBTwKkbVunNadQO6Vs2FTq fRbYXFrdZ0VUMhe+zB6ABrPH0Qv+q8l6ipxKYNtP+ZohhghLegI+e8JZwwfagpXrW0 pXlLe7mRa2ld3Ik7taoHQynv6txS4sv6UY86P8rQ= From: Kieran Bingham To: libcamera devel Date: Tue, 23 Nov 2021 22:40:12 +0000 Message-Id: <20211123224015.3619282-13-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211123224015.3619282-1-kieran.bingham@ideasonboard.com> References: <20211123224015.3619282-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 12/15] qcam: Convert to pragma once 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" Remove the verbose #ifndef/#define/#endif pattern for maintaining header idempotency, and replace it with a simple #pragma once. This simplifies the headers, and prevents redundant changes when header files get moved. Signed-off-by: Kieran Bingham --- src/qcam/dng_writer.h | 6 ++---- src/qcam/format_converter.h | 6 ++---- src/qcam/main_window.h | 6 ++---- src/qcam/message_handler.h | 6 ++---- src/qcam/viewfinder.h | 6 ++---- src/qcam/viewfinder_gl.h | 6 ++---- src/qcam/viewfinder_qt.h | 6 ++---- 7 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/qcam/dng_writer.h b/src/qcam/dng_writer.h index e4486288e629..c044bf8b8162 100644 --- a/src/qcam/dng_writer.h +++ b/src/qcam/dng_writer.h @@ -4,8 +4,8 @@ * * dng_writer.h - DNG writer */ -#ifndef __QCAM_DNG_WRITER_H__ -#define __QCAM_DNG_WRITER_H__ + +#pragma once #ifdef HAVE_TIFF #define HAVE_DNG @@ -25,5 +25,3 @@ public: }; #endif /* HAVE_TIFF */ - -#endif /* __QCAM_DNG_WRITER_H__ */ diff --git a/src/qcam/format_converter.h b/src/qcam/format_converter.h index 9da2df5d294b..37dbfae2d344 100644 --- a/src/qcam/format_converter.h +++ b/src/qcam/format_converter.h @@ -4,8 +4,8 @@ * * format_convert.h - qcam - Convert buffer to RGB */ -#ifndef __QCAM_FORMAT_CONVERTER_H__ -#define __QCAM_FORMAT_CONVERTER_H__ + +#pragma once #include @@ -60,5 +60,3 @@ private: unsigned int y_pos_; unsigned int cb_pos_; }; - -#endif /* __QCAM_FORMAT_CONVERTER_H__ */ diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h index 4d8e806b2bf4..3fbe872c0b5b 100644 --- a/src/qcam/main_window.h +++ b/src/qcam/main_window.h @@ -4,8 +4,8 @@ * * main_window.h - qcam - Main application window */ -#ifndef __QCAM_MAIN_WINDOW_H__ -#define __QCAM_MAIN_WINDOW_H__ + +#pragma once #include #include @@ -126,5 +126,3 @@ private: std::vector> requests_; }; - -#endif /* __QCAM_MAIN_WINDOW__ */ diff --git a/src/qcam/message_handler.h b/src/qcam/message_handler.h index 4534db9d93f7..56294d37ce2f 100644 --- a/src/qcam/message_handler.h +++ b/src/qcam/message_handler.h @@ -4,8 +4,8 @@ * * message_handler.cpp - qcam - Log message handling */ -#ifndef __QCAM_MESSAGE_HANDLER_H__ -#define __QCAM_MESSAGE_HANDLER_H__ + +#pragma once #include @@ -22,5 +22,3 @@ private: static QtMessageHandler handler_; static bool verbose_; }; - -#endif /* __QCAM_MESSAGE_HANDLER_H__ */ diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h index 4c2102a6ed04..260074aed440 100644 --- a/src/qcam/viewfinder.h +++ b/src/qcam/viewfinder.h @@ -4,8 +4,8 @@ * * viewfinder.h - qcam - Viewfinder base class */ -#ifndef __QCAM_VIEWFINDER_H__ -#define __QCAM_VIEWFINDER_H__ + +#pragma once #include #include @@ -30,5 +30,3 @@ public: virtual QImage getCurrentImage() = 0; }; - -#endif /* __QCAM_VIEWFINDER_H__ */ diff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h index 37b1ddd04b1d..0a9275baf9b9 100644 --- a/src/qcam/viewfinder_gl.h +++ b/src/qcam/viewfinder_gl.h @@ -5,8 +5,8 @@ * viewfinder_GL.h - OpenGL Viewfinder for rendering by OpenGL shader * */ -#ifndef __VIEWFINDER_GL_H__ -#define __VIEWFINDER_GL_H__ + +#pragma once #include #include @@ -103,5 +103,3 @@ private: QMutex mutex_; /* Prevent concurrent access to image_ */ }; - -#endif /* __VIEWFINDER_GL_H__ */ diff --git a/src/qcam/viewfinder_qt.h b/src/qcam/viewfinder_qt.h index 756f3fa33055..8c62145211d1 100644 --- a/src/qcam/viewfinder_qt.h +++ b/src/qcam/viewfinder_qt.h @@ -4,8 +4,8 @@ * * viewfinder_qt.h - qcam - QPainter-based ViewFinder */ -#ifndef __QCAM_VIEWFINDER_QT_H__ -#define __QCAM_VIEWFINDER_QT_H__ + +#pragma once #include #include @@ -61,5 +61,3 @@ private: QImage image_; QMutex mutex_; /* Prevent concurrent access to image_ */ }; - -#endif /* __QCAM_VIEWFINDER_QT_H__ */