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 <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:
Kieran Bingham 2021-11-23 17:23:07 +00:00
parent 0701f756b9
commit df131ad088
33 changed files with 64 additions and 132 deletions

View file

@ -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 <stdint.h>
#include <sys/types.h>
@ -57,5 +56,3 @@ private:
};
} /* namespace libcamera */
#endif /* __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ */