Patch Detail
Show a patch.
GET /api/1.1/patches/14738/?format=api
{ "id": 14738, "url": "https://patchwork.libcamera.org/api/1.1/patches/14738/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14738/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20211123224015.3619282-8-kieran.bingham@ideasonboard.com>", "date": "2021-11-23T22:40:07", "name": "[libcamera-devel,07/15] cam: Convert to pragma once", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "af0bd9dda9a62bc797e6ca89286b13d4107e8a01", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": { "id": 11, "url": "https://patchwork.libcamera.org/api/1.1/users/11/?format=api", "username": "kbingham", "first_name": "Kieran", "last_name": "Bingham", "email": "kieran.bingham@ideasonboard.com" }, "mbox": "https://patchwork.libcamera.org/patch/14738/mbox/", "series": [ { "id": 2749, "url": "https://patchwork.libcamera.org/api/1.1/series/2749/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2749", "date": "2021-11-23T22:40:00", "name": "Use pragma once", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2749/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14738/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14738/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 71AB1C3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Nov 2021 22:40:34 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E00BC604FD;\n\tTue, 23 Nov 2021 23:40:30 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3448D6022F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Nov 2021 23:40:22 +0100 (CET)", "from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DE109A1B;\n\tTue, 23 Nov 2021 23:40:21 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VvZn2hrr\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637707222;\n\tbh=6q3mUWZZVUcQAe99GQHwPuATVYTMqKu9oqegzWLA470=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=VvZn2hrrZ1xzo2NHmRuCUaOEwmonME0NN3Xb1uNOLmOVjSGdOgtNS14KnwOM8Oiab\n\tcqG043hXCMBSlNmDgPVc4P3g1yxvPvjNn7VNX/r8WJXfU+rLaUkhVNYasRW3d01xMN\n\te0f1Wz840K4FoZ2w4H0Gx2wqMchVCran2fGf8Vq4=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Tue, 23 Nov 2021 22:40:07 +0000", "Message-Id": "<20211123224015.3619282-8-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", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 07/15] cam: Convert to pragma once", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Remove the verbose #ifndef/#define/#endif pattern for maintaining\nheader idempotency, and replace it with a simple #pragma once.\n\nThis simplifies the headers, and prevents redundant changes when\nheader files get moved.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/cam/camera_session.h | 6 ++----\n src/cam/drm.h | 6 ++----\n src/cam/event_loop.h | 6 ++----\n src/cam/file_sink.h | 6 ++----\n src/cam/frame_sink.h | 6 ++----\n src/cam/image.h | 6 ++----\n src/cam/kms_sink.h | 6 ++----\n src/cam/main.h | 6 ++----\n src/cam/options.h | 6 ++----\n src/cam/stream_options.h | 6 ++----\n 10 files changed, 20 insertions(+), 40 deletions(-)", "diff": "diff --git a/src/cam/camera_session.h b/src/cam/camera_session.h\nindex a7f92d61307e..bf966bd15ab0 100644\n--- a/src/cam/camera_session.h\n+++ b/src/cam/camera_session.h\n@@ -4,8 +4,8 @@\n *\n * camera_session.h - Camera capture session\n */\n-#ifndef __CAM_CAMERA_SESSION_H__\n-#define __CAM_CAMERA_SESSION_H__\n+\n+#pragma once\n \n #include <memory>\n #include <stdint.h>\n@@ -74,5 +74,3 @@ private:\n \tstd::unique_ptr<libcamera::FrameBufferAllocator> allocator_;\n \tstd::vector<std::unique_ptr<libcamera::Request>> requests_;\n };\n-\n-#endif /* __CAM_CAMERA_SESSION_H__ */\ndiff --git a/src/cam/drm.h b/src/cam/drm.h\nindex 0b88f9a33912..de57e4457951 100644\n--- a/src/cam/drm.h\n+++ b/src/cam/drm.h\n@@ -4,8 +4,8 @@\n *\n * drm.h - DRM/KMS Helpers\n */\n-#ifndef __CAM_DRM_H__\n-#define __CAM_DRM_H__\n+\n+#pragma once\n \n #include <array>\n #include <list>\n@@ -330,5 +330,3 @@ private:\n };\n \n } /* namespace DRM */\n-\n-#endif /* __CAM_DRM_H__ */\ndiff --git a/src/cam/event_loop.h b/src/cam/event_loop.h\nindex 57bb6fb34aa7..a4613eb29b30 100644\n--- a/src/cam/event_loop.h\n+++ b/src/cam/event_loop.h\n@@ -4,8 +4,8 @@\n *\n * event_loop.h - cam - Event loop\n */\n-#ifndef __CAM_EVENT_LOOP_H__\n-#define __CAM_EVENT_LOOP_H__\n+\n+#pragma once\n \n #include <functional>\n #include <memory>\n@@ -61,5 +61,3 @@ private:\n \t\t\t\t void *param);\n \tvoid dispatchCall();\n };\n-\n-#endif /* __CAM_EVENT_LOOP_H__ */\ndiff --git a/src/cam/file_sink.h b/src/cam/file_sink.h\nindex 8de93a01a1e8..067736f5b8db 100644\n--- a/src/cam/file_sink.h\n+++ b/src/cam/file_sink.h\n@@ -4,8 +4,8 @@\n *\n * file_sink.h - File Sink\n */\n-#ifndef __CAM_FILE_SINK_H__\n-#define __CAM_FILE_SINK_H__\n+\n+#pragma once\n \n #include <map>\n #include <memory>\n@@ -38,5 +38,3 @@ private:\n \tstd::string pattern_;\n \tstd::map<libcamera::FrameBuffer *, std::unique_ptr<Image>> mappedBuffers_;\n };\n-\n-#endif /* __CAM_FILE_SINK_H__ */\ndiff --git a/src/cam/frame_sink.h b/src/cam/frame_sink.h\nindex 76e1fc30a905..ca4347cb2650 100644\n--- a/src/cam/frame_sink.h\n+++ b/src/cam/frame_sink.h\n@@ -4,8 +4,8 @@\n *\n * frame_sink.h - Base Frame Sink Class\n */\n-#ifndef __CAM_FRAME_SINK_H__\n-#define __CAM_FRAME_SINK_H__\n+\n+#pragma once\n \n #include <libcamera/base/signal.h>\n \n@@ -30,5 +30,3 @@ public:\n \tvirtual bool processRequest(libcamera::Request *request) = 0;\n \tlibcamera::Signal<libcamera::Request *> requestProcessed;\n };\n-\n-#endif /* __CAM_FRAME_SINK_H__ */\ndiff --git a/src/cam/image.h b/src/cam/image.h\nindex f7fc5b271de8..7953b1776782 100644\n--- a/src/cam/image.h\n+++ b/src/cam/image.h\n@@ -4,8 +4,8 @@\n *\n * image.h - Multi-planar image with access to pixel data\n */\n-#ifndef __CAM_IMAGE_H__\n-#define __CAM_IMAGE_H__\n+\n+#pragma once\n \n #include <memory>\n #include <stdint.h>\n@@ -48,5 +48,3 @@ private:\n namespace libcamera {\n LIBCAMERA_FLAGS_ENABLE_OPERATORS(Image::MapMode)\n }\n-\n-#endif /* __CAM_IMAGE_H__ */\ndiff --git a/src/cam/kms_sink.h b/src/cam/kms_sink.h\nindex 072ef1c90793..1e4290adba21 100644\n--- a/src/cam/kms_sink.h\n+++ b/src/cam/kms_sink.h\n@@ -4,8 +4,8 @@\n *\n * kms_sink.h - KMS Sink\n */\n-#ifndef __CAM_KMS_SINK_H__\n-#define __CAM_KMS_SINK_H__\n+\n+#pragma once\n \n #include <list>\n #include <memory>\n@@ -68,5 +68,3 @@ private:\n \tstd::unique_ptr<Request> queued_;\n \tstd::unique_ptr<Request> active_;\n };\n-\n-#endif /* __CAM_KMS_SINK_H__ */\ndiff --git a/src/cam/main.h b/src/cam/main.h\nindex 1c2fab763698..62f7bbc9d181 100644\n--- a/src/cam/main.h\n+++ b/src/cam/main.h\n@@ -4,8 +4,8 @@\n *\n * main.h - Cam application\n */\n-#ifndef __CAM_MAIN_H__\n-#define __CAM_MAIN_H__\n+\n+#pragma once\n \n enum {\n \tOptCamera = 'c',\n@@ -22,5 +22,3 @@ enum {\n \tOptStrictFormats = 257,\n \tOptMetadata = 258,\n };\n-\n-#endif /* __CAM_MAIN_H__ */\ndiff --git a/src/cam/options.h b/src/cam/options.h\nindex 0047b4f220ed..4ddd49874b83 100644\n--- a/src/cam/options.h\n+++ b/src/cam/options.h\n@@ -4,8 +4,8 @@\n *\n * options.h - cam - Options parsing\n */\n-#ifndef __CAM_OPTIONS_H__\n-#define __CAM_OPTIONS_H__\n+\n+#pragma once\n \n #include <ctype.h>\n #include <list>\n@@ -155,5 +155,3 @@ private:\n \tstd::vector<OptionValue> array_;\n \tOptionsParser::Options children_;\n };\n-\n-#endif /* __CAM_OPTIONS_H__ */\ndiff --git a/src/cam/stream_options.h b/src/cam/stream_options.h\nindex fbbc13a3cc97..d235b77fb38f 100644\n--- a/src/cam/stream_options.h\n+++ b/src/cam/stream_options.h\n@@ -4,8 +4,8 @@\n *\n * stream_options.h - Helper to parse options for streams\n */\n-#ifndef __CAM_STREAM_OPTIONS_H__\n-#define __CAM_STREAM_OPTIONS_H__\n+\n+#pragma once\n \n #include <libcamera/camera.h>\n \n@@ -26,5 +26,3 @@ private:\n \tstatic bool parseRole(libcamera::StreamRole *role,\n \t\t\t const KeyValueParser::Options &options);\n };\n-\n-#endif /* __CAM_STREAM_OPTIONS_H__ */\n", "prefixes": [ "libcamera-devel", "07/15" ] }