commit b52936c73c9da87ec91c6f5997f3689d0ea86994
parent 7a0efabf21977b5bc449811a1498ace580233aaf
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Tue, 21 Dec 2021 15:45:15 +0100
Fix header inclusion with c++
Diffstat:
15 files changed, 25 insertions(+), 29 deletions(-)
diff --git a/include/clap/audio-buffer.h b/include/clap/audio-buffer.h
@@ -1,7 +1,5 @@
#pragma once
-#include <stdint.h>
-
#include "private/align.h"
#ifdef __cplusplus
diff --git a/include/clap/chmap.h b/include/clap/chmap.h
@@ -1,6 +1,6 @@
#pragma once
-#include <stdint.h>
+#include "private/std.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/clap/color.h b/include/clap/color.h
@@ -1,6 +1,6 @@
#pragma once
-#include <stdint.h>
+#include "private/std.h"
#ifdef __cplusplus
extern "C" {
diff --git a/include/clap/converters/clap-converter.h b/include/clap/converters/clap-converter.h
@@ -17,8 +17,8 @@ typedef struct clap_clap_converter {
// [main-thread]
bool (*convert_state)(const struct clap_clap_converter *converter,
- const clap_istream *src,
- const clap_ostream *dst);
+ const clap_istream_t *src,
+ const clap_ostream_t *dst);
// converts the vst3 param id and plain value to clap param id and
// plain value.
diff --git a/include/clap/events.h b/include/clap/events.h
@@ -1,7 +1,6 @@
#pragma once
-#include <stdbool.h>
-#include <stddef.h>
+#include "private/std.h"
#include "fixedpoint.h"
#include "id.h"
diff --git a/include/clap/ext/fd-support.h b/include/clap/ext/fd-support.h
@@ -1,7 +1,5 @@
#pragma once
-#include <stddef.h>
-
#include "../plugin.h"
static CLAP_CONSTEXPR const char CLAP_EXT_FD_SUPPORT[] = "clap.fd-support";
diff --git a/include/clap/ext/timer-support.h b/include/clap/ext/timer-support.h
@@ -1,7 +1,5 @@
#pragma once
-#include <stddef.h>
-
#include "../plugin.h"
static CLAP_CONSTEXPR const char CLAP_EXT_TIMER_SUPPORT[] = "clap.timer-support";
diff --git a/include/clap/fixedpoint.h b/include/clap/fixedpoint.h
@@ -1,7 +1,6 @@
#pragma once
-#include <stdint.h>
-
+#include "private/std.h"
#include "private/macros.h"
/// We use fixed point representation of beat time and seconds time
diff --git a/include/clap/id.h b/include/clap/id.h
@@ -1,7 +1,6 @@
#pragma once
-#include <stdint.h>
-
+#include "private/std.h"
#include "private/macros.h"
typedef uint32_t clap_id;
diff --git a/include/clap/plugin-invalidation.h b/include/clap/plugin-invalidation.h
@@ -1,8 +1,5 @@
#pragma once
-#include <stdbool.h>
-#include <stdint.h>
-
#include "private/macros.h"
#include "private/align.h"
diff --git a/include/clap/private/align.h b/include/clap/private/align.h
@@ -1,5 +1,6 @@
-#include <stdint.h>
-#include <stdalign.h>
+#pragma once
+
+#include "std.h"
#if UINTPTR_MAX == UINT64_MAX
# define CLAP_PTR_ALIGN 8
diff --git a/include/clap/private/std.h b/include/clap/private/std.h
@@ -0,0 +1,12 @@
+#pragma once
+
+#ifdef __cplusplus
+# include <cstdint>
+# include <cstdalign>
+# include <cstddef>
+#else
+# include <stddef.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <stdalign.h>
+#endif
+\ No newline at end of file
diff --git a/include/clap/stream.h b/include/clap/stream.h
@@ -1,7 +1,5 @@
#pragma once
-#include <stdint.h>
-
#include "private/align.h"
#ifdef __cplusplus
diff --git a/include/clap/string-sizes.h b/include/clap/string-sizes.h
@@ -1,6 +1,6 @@
#pragma once
-#include <stdint.h>
+#include "private/std.h"
#ifdef __cplusplus
extern "C" {
@@ -15,4 +15,4 @@ enum {
#ifdef __cplusplus
}
-#endif
-\ No newline at end of file
+#endif
diff --git a/include/clap/version.h b/include/clap/version.h
@@ -1,8 +1,5 @@
#pragma once
-#include <stdbool.h>
-#include <stdint.h>
-
#include "private/macros.h"
#include "private/align.h"