From b426b778c680a266d3c67e866fa07d81011bd16d Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 23 Nov 2021 17:23:07 +0000 Subject: libcamera: pipeline: 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. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Jean-Michel Hautbois --- src/libcamera/pipeline/ipu3/cio2.h | 6 ++---- src/libcamera/pipeline/ipu3/frames.h | 6 ++---- src/libcamera/pipeline/ipu3/imgu.h | 6 ++---- src/libcamera/pipeline/raspberrypi/dma_heaps.h | 6 ++---- src/libcamera/pipeline/raspberrypi/rpi_stream.h | 6 ++---- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 6 ++---- src/libcamera/pipeline/simple/converter.h | 5 +---- 7 files changed, 13 insertions(+), 28 deletions(-) (limited to 'src/libcamera') diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h index ba8f0052..68504a2d 100644 --- a/src/libcamera/pipeline/ipu3/cio2.h +++ b/src/libcamera/pipeline/ipu3/cio2.h @@ -4,8 +4,8 @@ * * cio2.h - Intel IPU3 CIO2 */ -#ifndef __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ -#define __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ + +#pragma once #include #include @@ -75,5 +75,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_IPU3_CIO2_H__ */ diff --git a/src/libcamera/pipeline/ipu3/frames.h b/src/libcamera/pipeline/ipu3/frames.h index 614701e2..6e3cb915 100644 --- a/src/libcamera/pipeline/ipu3/frames.h +++ b/src/libcamera/pipeline/ipu3/frames.h @@ -4,8 +4,8 @@ * * frames.h - Intel IPU3 Frames helper */ -#ifndef __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ -#define __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ + +#pragma once #include #include @@ -65,5 +65,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_IPU3_FRAMES_H__ */ diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h index 2b28d912..0af4dd8a 100644 --- a/src/libcamera/pipeline/ipu3/imgu.h +++ b/src/libcamera/pipeline/ipu3/imgu.h @@ -4,8 +4,8 @@ * * imgu.h - Intel IPU3 ImgU */ -#ifndef __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ -#define __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ + +#pragma once #include #include @@ -122,5 +122,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_IPU3_IMGU_H__ */ diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h index 79f39c51..38dfc242 100644 --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h @@ -4,8 +4,8 @@ * * dma_heaps.h - Helper class for dma-heap allocations. */ -#ifndef __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ -#define __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ + +#pragma once #include @@ -28,5 +28,3 @@ private: } /* namespace RPi */ } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_RASPBERRYPI_DMA_HEAPS_H__ */ diff --git a/src/libcamera/pipeline/raspberrypi/rpi_stream.h b/src/libcamera/pipeline/raspberrypi/rpi_stream.h index f1ac715f..d6f49d34 100644 --- a/src/libcamera/pipeline/raspberrypi/rpi_stream.h +++ b/src/libcamera/pipeline/raspberrypi/rpi_stream.h @@ -4,8 +4,8 @@ * * rpi_stream.h - Raspberry Pi device stream abstraction class. */ -#ifndef __LIBCAMERA_PIPELINE_RPI_STREAM_H__ -#define __LIBCAMERA_PIPELINE_RPI_STREAM_H__ + +#pragma once #include #include @@ -177,5 +177,3 @@ public: } /* namespace RPi */ } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_RPI_STREAM_H__ */ diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h index 91757600..f3f1ae39 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h @@ -4,8 +4,8 @@ * * rkisp1path.h - Rockchip ISP1 path helper */ -#ifndef __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ -#define __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ + +#pragma once #include #include @@ -84,5 +84,3 @@ public: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_RKISP1_PATH_H__ */ diff --git a/src/libcamera/pipeline/simple/converter.h b/src/libcamera/pipeline/simple/converter.h index 276a2a29..f0ebe2e0 100644 --- a/src/libcamera/pipeline/simple/converter.h +++ b/src/libcamera/pipeline/simple/converter.h @@ -5,8 +5,7 @@ * converter.h - Format converter for simple pipeline handler */ -#ifndef __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ -#define __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ +#pragma once #include #include @@ -97,5 +96,3 @@ private: }; } /* namespace libcamera */ - -#endif /* __LIBCAMERA_PIPELINE_SIMPLE_CONVERTER_H__ */ -- cgit v1.2.1