mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 17:15:07 +03:00
cam: 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 <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
This commit is contained in:
parent
0382fcb22b
commit
2c72ca70e2
10 changed files with 20 additions and 40 deletions
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* camera_session.h - Camera capture session
|
||||
*/
|
||||
#ifndef __CAM_CAMERA_SESSION_H__
|
||||
#define __CAM_CAMERA_SESSION_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
|
@ -74,5 +74,3 @@ private:
|
|||
std::unique_ptr<libcamera::FrameBufferAllocator> allocator_;
|
||||
std::vector<std::unique_ptr<libcamera::Request>> requests_;
|
||||
};
|
||||
|
||||
#endif /* __CAM_CAMERA_SESSION_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* drm.h - DRM/KMS Helpers
|
||||
*/
|
||||
#ifndef __CAM_DRM_H__
|
||||
#define __CAM_DRM_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <list>
|
||||
|
@ -330,5 +330,3 @@ private:
|
|||
};
|
||||
|
||||
} /* namespace DRM */
|
||||
|
||||
#endif /* __CAM_DRM_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* event_loop.h - cam - Event loop
|
||||
*/
|
||||
#ifndef __CAM_EVENT_LOOP_H__
|
||||
#define __CAM_EVENT_LOOP_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
@ -61,5 +61,3 @@ private:
|
|||
void *param);
|
||||
void dispatchCall();
|
||||
};
|
||||
|
||||
#endif /* __CAM_EVENT_LOOP_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* file_sink.h - File Sink
|
||||
*/
|
||||
#ifndef __CAM_FILE_SINK_H__
|
||||
#define __CAM_FILE_SINK_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -38,5 +38,3 @@ private:
|
|||
std::string pattern_;
|
||||
std::map<libcamera::FrameBuffer *, std::unique_ptr<Image>> mappedBuffers_;
|
||||
};
|
||||
|
||||
#endif /* __CAM_FILE_SINK_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* frame_sink.h - Base Frame Sink Class
|
||||
*/
|
||||
#ifndef __CAM_FRAME_SINK_H__
|
||||
#define __CAM_FRAME_SINK_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libcamera/base/signal.h>
|
||||
|
||||
|
@ -30,5 +30,3 @@ public:
|
|||
virtual bool processRequest(libcamera::Request *request) = 0;
|
||||
libcamera::Signal<libcamera::Request *> requestProcessed;
|
||||
};
|
||||
|
||||
#endif /* __CAM_FRAME_SINK_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* image.h - Multi-planar image with access to pixel data
|
||||
*/
|
||||
#ifndef __CAM_IMAGE_H__
|
||||
#define __CAM_IMAGE_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
|
@ -48,5 +48,3 @@ private:
|
|||
namespace libcamera {
|
||||
LIBCAMERA_FLAGS_ENABLE_OPERATORS(Image::MapMode)
|
||||
}
|
||||
|
||||
#endif /* __CAM_IMAGE_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* kms_sink.h - KMS Sink
|
||||
*/
|
||||
#ifndef __CAM_KMS_SINK_H__
|
||||
#define __CAM_KMS_SINK_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
@ -68,5 +68,3 @@ private:
|
|||
std::unique_ptr<Request> queued_;
|
||||
std::unique_ptr<Request> active_;
|
||||
};
|
||||
|
||||
#endif /* __CAM_KMS_SINK_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* main.h - Cam application
|
||||
*/
|
||||
#ifndef __CAM_MAIN_H__
|
||||
#define __CAM_MAIN_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
enum {
|
||||
OptCamera = 'c',
|
||||
|
@ -22,5 +22,3 @@ enum {
|
|||
OptStrictFormats = 257,
|
||||
OptMetadata = 258,
|
||||
};
|
||||
|
||||
#endif /* __CAM_MAIN_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* options.h - cam - Options parsing
|
||||
*/
|
||||
#ifndef __CAM_OPTIONS_H__
|
||||
#define __CAM_OPTIONS_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ctype.h>
|
||||
#include <list>
|
||||
|
@ -155,5 +155,3 @@ private:
|
|||
std::vector<OptionValue> array_;
|
||||
OptionsParser::Options children_;
|
||||
};
|
||||
|
||||
#endif /* __CAM_OPTIONS_H__ */
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
*
|
||||
* stream_options.h - Helper to parse options for streams
|
||||
*/
|
||||
#ifndef __CAM_STREAM_OPTIONS_H__
|
||||
#define __CAM_STREAM_OPTIONS_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <libcamera/camera.h>
|
||||
|
||||
|
@ -26,5 +26,3 @@ private:
|
|||
static bool parseRole(libcamera::StreamRole *role,
|
||||
const KeyValueParser::Options &options);
|
||||
};
|
||||
|
||||
#endif /* __CAM_STREAM_OPTIONS_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue