From patchwork Tue Nov 23 22:40:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 14734 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 7FB35BF415 for ; Tue, 23 Nov 2021 22:40:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C02B86022F; Tue, 23 Nov 2021 23:40:27 +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="Fy/1Hpg2"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A71260230 for ; Tue, 23 Nov 2021 23:40:21 +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 EC0C7A1B; Tue, 23 Nov 2021 23:40:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1637707221; bh=eHjnGg3U+bEWEKvbvs9EydPTRXUfuF/JLUrTtnqPsaA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fy/1Hpg2lY6RGEH0hdyAjtCzThxkOCIFMs0BxsrT3kFA3IhHbPXTNxvJ0oz06ptKu 90OIhbaE+BQUDpKRnx64yKHw7YTT2nV9OlaX9Qh7Y9VlraS4KG76+qLdSCH74/gNrN At7AiBBjWfDKqyYUMTFf0BBKx47g33OWFD9GEke8= From: Kieran Bingham To: libcamera devel Date: Tue, 23 Nov 2021 22:40:03 +0000 Message-Id: <20211123224015.3619282-4-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 03/15] libcamera: internal: 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 Reviewed-by: Laurent Pinchart Reviewed-by: Laurent Pinchart --- include/libcamera/internal/bayer_format.h | 6 ++---- include/libcamera/internal/byte_stream_buffer.h | 6 ++---- include/libcamera/internal/camera.h | 6 ++---- include/libcamera/internal/camera_controls.h | 6 ++---- include/libcamera/internal/camera_sensor.h | 6 ++---- include/libcamera/internal/camera_sensor_properties.h | 6 ++---- include/libcamera/internal/control_serializer.h | 6 ++---- include/libcamera/internal/control_validator.h | 6 ++---- include/libcamera/internal/delayed_controls.h | 6 ++---- include/libcamera/internal/device_enumerator.h | 6 ++---- include/libcamera/internal/device_enumerator_sysfs.h | 6 ++---- include/libcamera/internal/device_enumerator_udev.h | 6 ++---- include/libcamera/internal/formats.h | 5 +---- include/libcamera/internal/framebuffer.h | 6 ++---- include/libcamera/internal/ipa_data_serializer.h | 6 ++---- include/libcamera/internal/ipa_manager.h | 6 ++---- include/libcamera/internal/ipa_module.h | 6 ++---- include/libcamera/internal/ipa_proxy.h | 6 ++---- include/libcamera/internal/ipc_pipe.h | 6 ++---- include/libcamera/internal/ipc_pipe_unixsocket.h | 6 ++---- include/libcamera/internal/ipc_unixsocket.h | 5 +---- include/libcamera/internal/mapped_framebuffer.h | 6 ++---- include/libcamera/internal/media_device.h | 6 ++---- include/libcamera/internal/media_object.h | 6 ++---- include/libcamera/internal/pipeline_handler.h | 6 ++---- include/libcamera/internal/process.h | 6 ++---- include/libcamera/internal/pub_key.h | 6 ++---- include/libcamera/internal/source_paths.h | 6 ++---- include/libcamera/internal/sysfs.h | 6 ++---- include/libcamera/internal/tracepoints.h.in | 6 ++---- include/libcamera/internal/v4l2_device.h | 6 ++---- include/libcamera/internal/v4l2_pixelformat.h | 6 ++---- include/libcamera/internal/v4l2_subdevice.h | 6 ++---- include/libcamera/internal/v4l2_videodevice.h | 6 ++---- 34 files changed, 66 insertions(+), 136 deletions(-) diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h index 79a25b52582d..cb20bf9bea84 100644 --- a/include/libcamera/internal/bayer_format.h +++ b/include/libcamera/internal/bayer_format.h @@ -4,8 +4,8 @@ * * bayer_format.h - Bayer Pixel Format */ -#ifndef __LIBCAMERA_INTERNAL_BAYER_FORMAT_H__ -#define __LIBCAMERA_INTERNAL_BAYER_FORMAT_H__ + +#pragma once #include #include @@ -69,5 +69,3 @@ static inline bool operator!=(const BayerFormat &lhs, const BayerFormat &rhs) } } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_BAYER_FORMAT_H__ */ diff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h index d0f0df5ee87b..0f4fce6f4dc0 100644 --- a/include/libcamera/internal/byte_stream_buffer.h +++ b/include/libcamera/internal/byte_stream_buffer.h @@ -4,8 +4,8 @@ * * byte_stream_buffer.h - Byte stream buffer */ -#ifndef __LIBCAMERA_INTERNAL_BYTE_STREAM_BUFFER_H__ -#define __LIBCAMERA_INTERNAL_BYTE_STREAM_BUFFER_H__ + +#pragma once #include #include @@ -85,5 +85,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_BYTE_STREAM_BUFFER_H__ */ diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h index 9f5adac12a77..597426a6f9d2 100644 --- a/include/libcamera/internal/camera.h +++ b/include/libcamera/internal/camera.h @@ -4,8 +4,8 @@ * * camera.h - Camera private data */ -#ifndef __LIBCAMERA_INTERNAL_CAMERA_H__ -#define __LIBCAMERA_INTERNAL_CAMERA_H__ + +#pragma once #include #include @@ -72,5 +72,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_CAMERA_H__ */ diff --git a/include/libcamera/internal/camera_controls.h b/include/libcamera/internal/camera_controls.h index 6e40f4436cad..ee6d382f8989 100644 --- a/include/libcamera/internal/camera_controls.h +++ b/include/libcamera/internal/camera_controls.h @@ -4,8 +4,8 @@ * * camera_controls.h - Camera controls */ -#ifndef __LIBCAMERA_INTERNAL_CAMERA_CONTROLS_H__ -#define __LIBCAMERA_INTERNAL_CAMERA_CONTROLS_H__ + +#pragma once #include "libcamera/internal/control_validator.h" @@ -26,5 +26,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_CAMERA_CONTROLS_H__ */ diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index d25a1165a06c..2facbf3c8dc0 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -4,8 +4,8 @@ * * camera_sensor.h - A camera sensor */ -#ifndef __LIBCAMERA_INTERNAL_CAMERA_SENSOR_H__ -#define __LIBCAMERA_INTERNAL_CAMERA_SENSOR_H__ + +#pragma once #include #include @@ -94,5 +94,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_CAMERA_SENSOR_H__ */ diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h index 67c77920eb38..af381a121bfc 100644 --- a/include/libcamera/internal/camera_sensor_properties.h +++ b/include/libcamera/internal/camera_sensor_properties.h @@ -4,8 +4,8 @@ * * camera_sensor_properties.h - Database of camera sensor properties */ -#ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ -#define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ + +#pragma once #include #include @@ -22,5 +22,3 @@ struct CameraSensorProperties { }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ */ diff --git a/include/libcamera/internal/control_serializer.h b/include/libcamera/internal/control_serializer.h index caeafa11bc54..99e57feed608 100644 --- a/include/libcamera/internal/control_serializer.h +++ b/include/libcamera/internal/control_serializer.h @@ -4,8 +4,8 @@ * * control_serializer.h - Control (de)serializer */ -#ifndef __LIBCAMERA_INTERNAL_CONTROL_SERIALIZER_H__ -#define __LIBCAMERA_INTERNAL_CONTROL_SERIALIZER_H__ + +#pragma once #include #include @@ -60,5 +60,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_CONTROL_SERIALIZER_H__ */ diff --git a/include/libcamera/internal/control_validator.h b/include/libcamera/internal/control_validator.h index 206006954cd9..26412d8bac9a 100644 --- a/include/libcamera/internal/control_validator.h +++ b/include/libcamera/internal/control_validator.h @@ -4,8 +4,8 @@ * * control_validator.h - Control validator */ -#ifndef __LIBCAMERA_INTERNAL_CONTROL_VALIDATOR_H__ -#define __LIBCAMERA_INTERNAL_CONTROL_VALIDATOR_H__ + +#pragma once #include @@ -23,5 +23,3 @@ public: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_CONTROL_VALIDATOR_H__ */ diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h index 2a6a912bde10..703fdb66bc27 100644 --- a/include/libcamera/internal/delayed_controls.h +++ b/include/libcamera/internal/delayed_controls.h @@ -4,8 +4,8 @@ * * delayed_controls.h - Helper to deal with controls that take effect with a delay */ -#ifndef __LIBCAMERA_INTERNAL_DELAYED_CONTROLS_H__ -#define __LIBCAMERA_INTERNAL_DELAYED_CONTROLS_H__ + +#pragma once #include #include @@ -82,5 +82,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_DELAYED_CONTROLS_H__ */ diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h index baccfc000d87..72ec9a60b19a 100644 --- a/include/libcamera/internal/device_enumerator.h +++ b/include/libcamera/internal/device_enumerator.h @@ -4,8 +4,8 @@ * * device_enumerator.h - API to enumerate and find media devices */ -#ifndef __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_H__ -#define __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_H__ + +#pragma once #include #include @@ -55,5 +55,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_H__ */ diff --git a/include/libcamera/internal/device_enumerator_sysfs.h b/include/libcamera/internal/device_enumerator_sysfs.h index 2112bc543054..3e84b83f3200 100644 --- a/include/libcamera/internal/device_enumerator_sysfs.h +++ b/include/libcamera/internal/device_enumerator_sysfs.h @@ -4,8 +4,8 @@ * * device_enumerator_sysfs.h - sysfs-based device enumerator */ -#ifndef __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_SYSFS_H__ -#define __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_SYSFS_H__ + +#pragma once #include #include @@ -28,5 +28,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_SYSFS_H__ */ diff --git a/include/libcamera/internal/device_enumerator_udev.h b/include/libcamera/internal/device_enumerator_udev.h index c035298081b4..1b3360df31ba 100644 --- a/include/libcamera/internal/device_enumerator_udev.h +++ b/include/libcamera/internal/device_enumerator_udev.h @@ -4,8 +4,8 @@ * * device_enumerator_udev.h - udev-based device enumerator */ -#ifndef __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_UDEV_H__ -#define __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_UDEV_H__ + +#pragma once #include #include @@ -71,5 +71,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_UDEV_H__ */ diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h index 5ebc68f91cda..ee599765be47 100644 --- a/include/libcamera/internal/formats.h +++ b/include/libcamera/internal/formats.h @@ -5,8 +5,7 @@ * formats.h - libcamera image formats */ -#ifndef __LIBCAMERA_INTERNAL_FORMATS_H__ -#define __LIBCAMERA_INTERNAL_FORMATS_H__ +#pragma once #include #include @@ -68,5 +67,3 @@ public: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_FORMATS_H__ */ diff --git a/include/libcamera/internal/framebuffer.h b/include/libcamera/internal/framebuffer.h index cd33c295466e..908b478985e7 100644 --- a/include/libcamera/internal/framebuffer.h +++ b/include/libcamera/internal/framebuffer.h @@ -4,8 +4,8 @@ * * framebuffer.h - Internal frame buffer handling */ -#ifndef __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__ -#define __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__ + +#pragma once #include @@ -29,5 +29,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__ */ diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h index 4353e07b572d..c2f602d5b7de 100644 --- a/include/libcamera/internal/ipa_data_serializer.h +++ b/include/libcamera/internal/ipa_data_serializer.h @@ -4,8 +4,8 @@ * * ipa_data_serializer.h - Image Processing Algorithm data serializer */ -#ifndef __LIBCAMERA_INTERNAL_IPA_DATA_SERIALIZER_H__ -#define __LIBCAMERA_INTERNAL_IPA_DATA_SERIALIZER_H__ + +#pragma once #include #include @@ -304,5 +304,3 @@ public: #endif /* __DOXYGEN__ */ } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPA_DATA_SERIALIZER_H__ */ diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h index 0687842e5c06..7f36e58e8bfa 100644 --- a/include/libcamera/internal/ipa_manager.h +++ b/include/libcamera/internal/ipa_manager.h @@ -4,8 +4,8 @@ * * ipa_manager.h - Image Processing Algorithm module manager */ -#ifndef __LIBCAMERA_INTERNAL_IPA_MANAGER_H__ -#define __LIBCAMERA_INTERNAL_IPA_MANAGER_H__ + +#pragma once #include #include @@ -68,5 +68,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPA_MANAGER_H__ */ diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h index a87f56502b9a..8038bdee6b3c 100644 --- a/include/libcamera/internal/ipa_module.h +++ b/include/libcamera/internal/ipa_module.h @@ -4,8 +4,8 @@ * * ipa_module.h - Image Processing Algorithm module */ -#ifndef __LIBCAMERA_INTERNAL_IPA_MODULE_H__ -#define __LIBCAMERA_INTERNAL_IPA_MODULE_H__ + +#pragma once #include #include @@ -58,5 +58,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPA_MODULE_H__ */ diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h index ea9f0760c2fc..781c8b623605 100644 --- a/include/libcamera/internal/ipa_proxy.h +++ b/include/libcamera/internal/ipa_proxy.h @@ -4,8 +4,8 @@ * * ipa_proxy.h - Image Processing Algorithm proxy */ -#ifndef __LIBCAMERA_INTERNAL_IPA_PROXY_H__ -#define __LIBCAMERA_INTERNAL_IPA_PROXY_H__ + +#pragma once #include #include @@ -44,5 +44,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPA_PROXY_H__ */ diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h index 52cc8fa30838..bd8824f255c2 100644 --- a/include/libcamera/internal/ipc_pipe.h +++ b/include/libcamera/internal/ipc_pipe.h @@ -4,8 +4,8 @@ * * ipc_pipe.h - Image Processing Algorithm IPC module for IPA proxies */ -#ifndef __LIBCAMERA_INTERNAL_IPA_IPC_H__ -#define __LIBCAMERA_INTERNAL_IPA_IPC_H__ + +#pragma once #include @@ -67,5 +67,3 @@ protected: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPA_IPC_H__ */ diff --git a/include/libcamera/internal/ipc_pipe_unixsocket.h b/include/libcamera/internal/ipc_pipe_unixsocket.h index ad2927fed7f0..004d953989c6 100644 --- a/include/libcamera/internal/ipc_pipe_unixsocket.h +++ b/include/libcamera/internal/ipc_pipe_unixsocket.h @@ -4,8 +4,8 @@ * * ipc_pipe_unixsocket.h - Image Processing Algorithm IPC module using unix socket */ -#ifndef __LIBCAMERA_INTERNAL_IPA_IPC_UNIXSOCKET_H__ -#define __LIBCAMERA_INTERNAL_IPA_IPC_UNIXSOCKET_H__ + +#pragma once #include #include @@ -45,5 +45,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPA_IPC_UNIXSOCKET_H__ */ diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h index 2b87196c4851..5010b66a2bda 100644 --- a/include/libcamera/internal/ipc_unixsocket.h +++ b/include/libcamera/internal/ipc_unixsocket.h @@ -5,8 +5,7 @@ * ipc_unixsocket.h - IPC mechanism based on Unix sockets */ -#ifndef __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ -#define __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ +#pragma once #include #include @@ -57,5 +56,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ */ diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h index 70ffbcbea078..fb39adbf5796 100644 --- a/include/libcamera/internal/mapped_framebuffer.h +++ b/include/libcamera/internal/mapped_framebuffer.h @@ -4,8 +4,8 @@ * * mapped_framebuffer.h - Frame buffer memory mapping support */ -#ifndef __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__ -#define __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__ + +#pragma once #include #include @@ -60,5 +60,3 @@ public: LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag) } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__ */ diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h index 1f2304c19281..d636e34a8573 100644 --- a/include/libcamera/internal/media_device.h +++ b/include/libcamera/internal/media_device.h @@ -4,8 +4,8 @@ * * media_device.h - Media device handler */ -#ifndef __LIBCAMERA_INTERNAL_MEDIA_DEVICE_H__ -#define __LIBCAMERA_INTERNAL_MEDIA_DEVICE_H__ + +#pragma once #include #include @@ -92,5 +92,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_MEDIA_DEVICE_H__ */ diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h index 6ae22c679cc5..90c635983ba7 100644 --- a/include/libcamera/internal/media_object.h +++ b/include/libcamera/internal/media_object.h @@ -4,8 +4,8 @@ * * media_object.h - Media Device objects: entities, pads and links. */ -#ifndef __LIBCAMERA_INTERNAL_MEDIA_OBJECT_H__ -#define __LIBCAMERA_INTERNAL_MEDIA_OBJECT_H__ + +#pragma once #include #include @@ -132,5 +132,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_MEDIA_OBJECT_H__ */ diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index 41cba44d990f..3de27ae93645 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -4,8 +4,8 @@ * * pipeline_handler.h - Pipeline handler infrastructure */ -#ifndef __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ -#define __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ + +#pragma once #include #include @@ -118,5 +118,3 @@ private: \ static handler##Factory global_##handler##Factory; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ */ diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h index 300e0521eb03..96748a3676e4 100644 --- a/include/libcamera/internal/process.h +++ b/include/libcamera/internal/process.h @@ -4,8 +4,8 @@ * * process.h - Process object */ -#ifndef __LIBCAMERA_INTERNAL_PROCESS_H__ -#define __LIBCAMERA_INTERNAL_PROCESS_H__ + +#pragma once #include #include @@ -80,5 +80,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_PROCESS_H__ */ diff --git a/include/libcamera/internal/pub_key.h b/include/libcamera/internal/pub_key.h index 9261c9c2a0ee..a22ba037cff6 100644 --- a/include/libcamera/internal/pub_key.h +++ b/include/libcamera/internal/pub_key.h @@ -4,8 +4,8 @@ * * pub_key.h - Public key signature verification */ -#ifndef __LIBCAMERA_INTERNAL_PUB_KEY_H__ -#define __LIBCAMERA_INTERNAL_PUB_KEY_H__ + +#pragma once #include @@ -34,5 +34,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_PUB_KEY_H__ */ diff --git a/include/libcamera/internal/source_paths.h b/include/libcamera/internal/source_paths.h index 111c25b00b43..be6f153b49db 100644 --- a/include/libcamera/internal/source_paths.h +++ b/include/libcamera/internal/source_paths.h @@ -4,8 +4,8 @@ * * source_paths.h - Identify libcamera source and build paths */ -#ifndef __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__ -#define __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__ + +#pragma once #include @@ -15,5 +15,3 @@ std::string libcameraBuildPath(); std::string libcameraSourcePath(); } /* namespace libcamera::utils */ - -#endif /* __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__ */ diff --git a/include/libcamera/internal/sysfs.h b/include/libcamera/internal/sysfs.h index bc6c1620b55d..917457bef6e2 100644 --- a/include/libcamera/internal/sysfs.h +++ b/include/libcamera/internal/sysfs.h @@ -4,8 +4,8 @@ * * sysfs.h - Miscellaneous utility functions to access sysfs */ -#ifndef __LIBCAMERA_INTERNAL_SYSFS_H__ -#define __LIBCAMERA_INTERNAL_SYSFS_H__ + +#pragma once #include @@ -20,5 +20,3 @@ std::string firmwareNodePath(const std::string &device); } /* namespace sysfs */ } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_SYSFS_H__ */ diff --git a/include/libcamera/internal/tracepoints.h.in b/include/libcamera/internal/tracepoints.h.in index d0fc136598b6..b093bc6b5eda 100644 --- a/include/libcamera/internal/tracepoints.h.in +++ b/include/libcamera/internal/tracepoints.h.in @@ -6,8 +6,8 @@ * * This file is auto-generated. Do not edit. */ -#ifndef __LIBCAMERA_INTERNAL_TRACEPOINTS_H__ -#define __LIBCAMERA_INTERNAL_TRACEPOINTS_H__ + +#pragma once #if HAVE_TRACING #define LIBCAMERA_TRACEPOINT(...) tracepoint(libcamera, __VA_ARGS__) @@ -36,8 +36,6 @@ inline void unused([[maybe_unused]] Args&& ...args) #endif /* HAVE_TRACING */ -#endif /* __LIBCAMERA_INTERNAL_TRACEPOINTS_H__ */ - #if HAVE_TRACING diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h index f21bc3701ca0..7816a290141d 100644 --- a/include/libcamera/internal/v4l2_device.h +++ b/include/libcamera/internal/v4l2_device.h @@ -4,8 +4,8 @@ * * v4l2_device.h - Common base for V4L2 video devices and subdevices */ -#ifndef __LIBCAMERA_INTERNAL_V4L2_DEVICE_H__ -#define __LIBCAMERA_INTERNAL_V4L2_DEVICE_H__ + +#pragma once #include #include @@ -79,5 +79,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_V4L2_DEVICE_H__ */ diff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h index e3cda6997c32..886d534d8c91 100644 --- a/include/libcamera/internal/v4l2_pixelformat.h +++ b/include/libcamera/internal/v4l2_pixelformat.h @@ -5,8 +5,8 @@ * * v4l2_pixelformat.h - V4L2 Pixel Format */ -#ifndef __LIBCAMERA_INTERNAL_V4L2_PIXELFORMAT_H__ -#define __LIBCAMERA_INTERNAL_V4L2_PIXELFORMAT_H__ + +#pragma once #include #include @@ -51,5 +51,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_V4L2_PIXELFORMAT_H__ */ diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h index 97b89fb95087..484fcfdda9b1 100644 --- a/include/libcamera/internal/v4l2_subdevice.h +++ b/include/libcamera/internal/v4l2_subdevice.h @@ -4,8 +4,8 @@ * * v4l2_subdevice.h - V4L2 Subdevice */ -#ifndef __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__ -#define __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__ + +#pragma once #include #include @@ -78,5 +78,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__ */ diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h index a1c458e45088..4a44b7fd53b1 100644 --- a/include/libcamera/internal/v4l2_videodevice.h +++ b/include/libcamera/internal/v4l2_videodevice.h @@ -4,8 +4,8 @@ * * v4l2_videodevice.h - V4L2 Video Device */ -#ifndef __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__ -#define __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__ + +#pragma once #include #include @@ -278,5 +278,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__ */