clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 49697a6a6577912003babf7fb27d2b599be46226
parent 5ab3e115ab7aa981794c8710053be4fdd249730c
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Fri,  3 Dec 2021 14:57:27 +0100

Replace the static inlines by macros

Diffstat:
Minclude/clap/version.h | 17++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/clap/version.h b/include/clap/version.h @@ -22,13 +22,13 @@ typedef struct clap_version { } #endif -static CLAP_CONSTEXPR const clap_version CLAP_VERSION = {0, 15, 0}; +#define CLAP_VERSION_MAJOR 0 +#define CLAP_VERSION_MINOR 15 +#define CLAP_VERSION_REVISION 0 -static CLAP_CONSTEXPR inline bool clap_version_is_compatible(const clap_version v) { - // For version 0, we require the same minor version because - // we may still break the ABI at this point - if (v.major == 0 && CLAP_VERSION.major == 0) - return v.minor == CLAP_VERSION.minor; +#define CLAP_VERSION (clap_version{CLAP_VERSION_MAJOR, CLAP_VERSION_MINOR, CLAP_VERSION_REVISION}) - return false; -} -\ No newline at end of file +// For version 0, we require the same minor version because +// we may still break the ABI at this point +#define clap_version_is_compatible(Version) \ + ((Version).major == CLAP_VERSION_MAJOR == 0 && (Version).minor == CLAP_VERSION_MINOR)