From 6b1e25693402a1db6cde995ae8e1b8bf74b88e17 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 28 Nov 2021 00:05:35 +0200 Subject: libcamera: Move compiler.h to base/ In preparation for usage of __nodiscard in the base API, move the compiler.h header to base. Signed-off-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- include/libcamera/base/compiler.h | 14 ++++++++++++++ include/libcamera/base/meson.build | 1 + include/libcamera/compiler.h | 14 -------------- include/libcamera/geometry.h | 2 +- include/libcamera/meson.build | 1 - 5 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 include/libcamera/base/compiler.h delete mode 100644 include/libcamera/compiler.h (limited to 'include') diff --git a/include/libcamera/base/compiler.h b/include/libcamera/base/compiler.h new file mode 100644 index 00000000..02564f2f --- /dev/null +++ b/include/libcamera/base/compiler.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2021, Google Inc. + * + * compiler.h - Compiler support + */ + +#pragma once + +#if __cplusplus >= 201703L +#define __nodiscard [[nodiscard]] +#else +#define __nodiscard +#endif diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build index 37c4435a..210a54f8 100644 --- a/include/libcamera/base/meson.build +++ b/include/libcamera/base/meson.build @@ -6,6 +6,7 @@ libcamera_base_headers = files([ 'backtrace.h', 'bound_method.h', 'class.h', + 'compiler.h', 'event_dispatcher.h', 'event_dispatcher_poll.h', 'event_notifier.h', diff --git a/include/libcamera/compiler.h b/include/libcamera/compiler.h deleted file mode 100644 index 02564f2f..00000000 --- a/include/libcamera/compiler.h +++ /dev/null @@ -1,14 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2021, Google Inc. - * - * compiler.h - Compiler support - */ - -#pragma once - -#if __cplusplus >= 201703L -#define __nodiscard [[nodiscard]] -#else -#define __nodiscard -#endif diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h index 713f71c1..7838b679 100644 --- a/include/libcamera/geometry.h +++ b/include/libcamera/geometry.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace libcamera { diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index 7155ff20..a8cca2a8 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -5,7 +5,6 @@ libcamera_include_dir = 'libcamera' / 'libcamera' libcamera_public_headers = files([ 'camera.h', 'camera_manager.h', - 'compiler.h', 'controls.h', 'file_descriptor.h', 'framebuffer.h', -- cgit v1.2.1