libcamera: 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
8212671ee7
commit
0a64cf8b76
17 changed files with 29 additions and 68 deletions
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* camera.h - Camera object interface
|
* camera.h - Camera object interface
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_CAMERA_H__
|
|
||||||
#define __LIBCAMERA_CAMERA_H__
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
@ -121,5 +121,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_CAMERA_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* camera_manager.h - Camera management
|
* camera_manager.h - Camera management
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_CAMERA_MANAGER_H__
|
|
||||||
#define __LIBCAMERA_CAMERA_MANAGER_H__
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -51,5 +51,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_CAMERA_MANAGER_H__ */
|
|
||||||
|
|
|
@ -4,13 +4,11 @@
|
||||||
*
|
*
|
||||||
* compiler.h - Compiler support
|
* compiler.h - Compiler support
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_COMPILER_H__
|
|
||||||
#define __LIBCAMERA_COMPILER_H__
|
#pragma once
|
||||||
|
|
||||||
#if __cplusplus >= 201703L
|
#if __cplusplus >= 201703L
|
||||||
#define __nodiscard [[nodiscard]]
|
#define __nodiscard [[nodiscard]]
|
||||||
#else
|
#else
|
||||||
#define __nodiscard
|
#define __nodiscard
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_COMPILER_H__ */
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
* This file is auto-generated. Do not edit.
|
* This file is auto-generated. Do not edit.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LIBCAMERA_CONTROL_IDS_H__
|
#pragma once
|
||||||
#define __LIBCAMERA_CONTROL_IDS_H__
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -36,5 +35,3 @@ ${draft_controls}
|
||||||
} /* namespace controls */
|
} /* namespace controls */
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_CONTROL_IDS_H__ */
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* controls.h - Control handling
|
* controls.h - Control handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LIBCAMERA_CONTROLS_H__
|
#pragma once
|
||||||
#define __LIBCAMERA_CONTROLS_H__
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
@ -421,5 +420,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_CONTROLS_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* file_descriptor.h - File descriptor wrapper
|
* file_descriptor.h - File descriptor wrapper
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_FILE_DESCRIPTOR_H__
|
|
||||||
#define __LIBCAMERA_FILE_DESCRIPTOR_H__
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
@ -47,5 +47,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_FILE_DESCRIPTOR_H__ */
|
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
*
|
*
|
||||||
* This file is auto-generated. Do not edit.
|
* This file is auto-generated. Do not edit.
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_FORMATS_H__
|
|
||||||
#define __LIBCAMERA_FORMATS_H__
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -40,5 +40,3 @@ ${formats}
|
||||||
} /* namespace formats */
|
} /* namespace formats */
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_FORMATS_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* framebuffer.h - Frame buffer handling
|
* framebuffer.h - Frame buffer handling
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_FRAMEBUFFER_H__
|
|
||||||
#define __LIBCAMERA_FRAMEBUFFER_H__
|
#pragma once
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
@ -81,5 +81,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_FRAMEBUFFER_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* framebuffer_allocator.h - FrameBuffer allocator
|
* framebuffer_allocator.h - FrameBuffer allocator
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_FRAMEBUFFER_ALLOCATOR_H__
|
|
||||||
#define __LIBCAMERA_FRAMEBUFFER_ALLOCATOR_H__
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -39,5 +39,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_FRAMEBUFFER_ALLOCATOR_H__ */
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* geometry.h - Geometry-related classes
|
* geometry.h - Geometry-related classes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LIBCAMERA_GEOMETRY_H__
|
#pragma once
|
||||||
#define __LIBCAMERA_GEOMETRY_H__
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -293,5 +292,3 @@ static inline bool operator!=(const Rectangle &lhs, const Rectangle &rhs)
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_GEOMETRY_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* logging.h - Logging infrastructure
|
* logging.h - Logging infrastructure
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_LOGGING_H__
|
|
||||||
#define __LIBCAMERA_LOGGING_H__
|
#pragma once
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
||||||
|
@ -22,5 +22,3 @@ int logSetTarget(LoggingTarget target);
|
||||||
void logSetLevel(const char *category, const char *level);
|
void logSetLevel(const char *category, const char *level);
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_LOGGING_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* pixel_format.h - libcamera Pixel Format
|
* pixel_format.h - libcamera Pixel Format
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_PIXEL_FORMAT_H__
|
|
||||||
#define __LIBCAMERA_PIXEL_FORMAT_H__
|
#pragma once
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -46,5 +46,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_PIXEL_FORMAT_H__ */
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
* This file is auto-generated. Do not edit.
|
* This file is auto-generated. Do not edit.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LIBCAMERA_PROPERTY_IDS_H__
|
#pragma once
|
||||||
#define __LIBCAMERA_PROPERTY_IDS_H__
|
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -35,5 +34,3 @@ extern const ControlIdMap properties;
|
||||||
} /* namespace properties */
|
} /* namespace properties */
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_PROPERTY_IDS_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* request.h - Capture request handling
|
* request.h - Capture request handling
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_REQUEST_H__
|
|
||||||
#define __LIBCAMERA_REQUEST_H__
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -83,5 +83,3 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_REQUEST_H__ */
|
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* stream.h - Video stream for a Camera
|
* stream.h - Video stream for a Camera
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_STREAM_H__
|
|
||||||
#define __LIBCAMERA_STREAM_H__
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -81,5 +81,3 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_STREAM_H__ */
|
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
* transform.h - 2D plane transforms
|
* transform.h - 2D plane transforms
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __LIBCAMERA_TRANSFORM_H__
|
#pragma once
|
||||||
#define __LIBCAMERA_TRANSFORM_H__
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -74,5 +73,3 @@ Transform transformFromRotation(int angle, bool *success = nullptr);
|
||||||
const char *transformToString(Transform t);
|
const char *transformToString(Transform t);
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_TRANSFORM_H__ */
|
|
||||||
|
|
|
@ -6,11 +6,9 @@
|
||||||
*
|
*
|
||||||
* This file is auto-generated. Do not edit.
|
* This file is auto-generated. Do not edit.
|
||||||
*/
|
*/
|
||||||
#ifndef __LIBCAMERA_VERSION_H__
|
|
||||||
#define __LIBCAMERA_VERSION_H__
|
#pragma once
|
||||||
|
|
||||||
#define LIBCAMERA_VERSION_MAJOR @LIBCAMERA_VERSION_MAJOR@
|
#define LIBCAMERA_VERSION_MAJOR @LIBCAMERA_VERSION_MAJOR@
|
||||||
#define LIBCAMERA_VERSION_MINOR @LIBCAMERA_VERSION_MINOR@
|
#define LIBCAMERA_VERSION_MINOR @LIBCAMERA_VERSION_MINOR@
|
||||||
#define LIBCAMERA_VERSION_PATCH @LIBCAMERA_VERSION_PATCH@
|
#define LIBCAMERA_VERSION_PATCH @LIBCAMERA_VERSION_PATCH@
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_VERSION_H__ */
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue