From df131ad088930258ad380b515b5ddfd96a92d8b6 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 23 Nov 2021 17:23:07 +0000 Subject: libcamera: internal: Convert to pragma once 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. Tracepoints.h.in is not modified to use the pragma as it requires self-inclusion. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Jean-Michel Hautbois --- 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/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 ++---- 33 files changed, 64 insertions(+), 132 deletions(-) (limited to 'include') diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h index 79a25b52..cb20bf9b 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 d0f0df5e..0f4fce6f 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 9f5adac1..597426a6 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 6e40f443..ee6d382f 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 d25a1165..2facbf3c 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 67c77920..af381a12 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 caeafa11..99e57fee 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 20600695..26412d8b 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 2a6a912b..703fdb66 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 baccfc00..72ec9a60 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 2112bc54..3e84b83f 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 c0352980..1b3360df 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 5ebc68f9..ee599765 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 cd33c295..908b4789 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 4353e07b..c2f602d5 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 0687842e..7f36e58e 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 a87f5650..8038bdee 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 ea9f0760..781c8b62 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 52cc8fa3..bd8824f2 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 ad2927fe..004d9539 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 2b87196c..5010b66a 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 70ffbcbe..fb39adbf 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 1f2304c1..d636e34a 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 6ae22c67..90c63598 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 41cba44d..3de27ae9 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 300e0521..96748a36 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 9261c9c2..a22ba037 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 111c25b0..be6f153b 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 bc6c1620..917457be 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/v4l2_device.h b/include/libcamera/internal/v4l2_device.h index f21bc370..7816a290 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 e3cda699..886d534d 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 97b89fb9..484fcfdd 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 a1c458e4..4a44b7fd 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__ */ -- cgit v1.2.1