Replace the static inlines by macros
@@ -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
+
+#define CLAP_VERSION (clap_version{CLAP_VERSION_MAJOR, CLAP_VERSION_MINOR, CLAP_VERSION_REVISION})
-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;
-
- return false;
-}
\ No newline at end of file
+#define clap_version_is_compatible(Version) \
+ ((Version).major == CLAP_VERSION_MAJOR == 0 && (Version).minor == CLAP_VERSION_MINOR)
