{"id":14743,"url":"https://patchwork.libcamera.org/api/1.1/patches/14743/?format=json","web_url":"https://patchwork.libcamera.org/patch/14743/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","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-11-kieran.bingham@ideasonboard.com>","date":"2021-11-23T22:40:10","name":"[libcamera-devel,10/15] ipa: libipa: Convert to pragma once","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"9e744cc22627a39c99940e1f2c886c06b1ac44ca","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":{"id":11,"url":"https://patchwork.libcamera.org/api/1.1/users/11/?format=json","username":"kbingham","first_name":"Kieran","last_name":"Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/14743/mbox/","series":[{"id":2749,"url":"https://patchwork.libcamera.org/api/1.1/series/2749/?format=json","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/14743/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14743/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 0F180C324F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Nov 2021 22:40:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6B1B60490;\n\tTue, 23 Nov 2021 23:40:39 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4972603CB\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 98E0FF95;\n\tTue, 23 Nov 2021 23:40:22 +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=\"kZWmxSj+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637707222;\n\tbh=60gufxY7DkGItsfTltIp3x7DFWUCjtNaXeRIMh430cg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kZWmxSj+M80thpXqLm4bJMhaXLQHEsQ1uUx+ALHsOXkeqcblonyjpcHCMAVRlguVd\n\tsX/tMLV10dlkq/t0zwxtl839GZa0DHTDGWvo28t6aOU80ZaX5OcL5HGc20QjXyAh30\n\tLK9885fwOcAKMQjy4usD7jgD3GfZ2aCcoL4cd8Pg=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 23 Nov 2021 22:40:10 +0000","Message-Id":"<20211123224015.3619282-11-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 10/15] ipa: libipa: 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/ipa/libipa/camera_sensor_helper.h | 6 ++----\n src/ipa/libipa/histogram.h            | 6 ++----\n 2 files changed, 4 insertions(+), 8 deletions(-)","diff":"diff --git a/src/ipa/libipa/camera_sensor_helper.h b/src/ipa/libipa/camera_sensor_helper.h\nindex a7e4ab3b2af6..26adfcb5955f 100644\n--- a/src/ipa/libipa/camera_sensor_helper.h\n+++ b/src/ipa/libipa/camera_sensor_helper.h\n@@ -4,8 +4,8 @@\n  *\n  * camera_sensor_helper.h - Helper class that performs sensor-specific parameter computations\n  */\n-#ifndef __LIBCAMERA_IPA_LIBIPA_CAMERA_SENSOR_HELPER_H__\n-#define __LIBCAMERA_IPA_LIBIPA_CAMERA_SENSOR_HELPER_H__\n+\n+#pragma once\n \n #include <stdint.h>\n \n@@ -85,5 +85,3 @@ static helper##Factory global_##helper##Factory;\n } /* namespace ipa */\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_IPA_LIBIPA_CAMERA_SENSOR_HELPER_H__ */\ndiff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h\nindex c2761cb29e7a..c40a366bb38c 100644\n--- a/src/ipa/libipa/histogram.h\n+++ b/src/ipa/libipa/histogram.h\n@@ -4,8 +4,8 @@\n  *\n  * histogram.h - histogram calculation interface\n  */\n-#ifndef __LIBCAMERA_IPA_LIBIPA_HISTOGRAM_H__\n-#define __LIBCAMERA_IPA_LIBIPA_HISTOGRAM_H__\n+\n+#pragma once\n \n #include <assert.h>\n #include <limits.h>\n@@ -36,5 +36,3 @@ private:\n } /* namespace ipa */\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_IPA_LIBIPA_HISTOGRAM_H__ */\n","prefixes":["libcamera-devel","10/15"]}