Move CLAP version serialization to version.h

This commit is contained in:
Robbert van der Helm
2022-09-12 17:25:44 +02:00
parent fa47274dd4
commit 22e0fee244
3 changed files with 9 additions and 7 deletions
+1
View File
@@ -25,6 +25,7 @@
#include "../../bitsery/ext/in-place-optional.h"
#include "../common.h"
#include "version.h"
// Serialization messages for `clap/host.h`
+1 -7
View File
@@ -27,6 +27,7 @@
#include "../audio-shm.h"
#include "../common.h"
#include "host.h"
#include "version.h"
// Serialization messages for `clap/plugin.h`
@@ -276,10 +277,3 @@ struct Reset {
} // namespace plugin
} // namespace clap
template <typename S>
void serialize(S& s, clap_version_t& version) {
s.value4b(version.major);
s.value4b(version.minor);
s.value4b(version.revision);
}
+7
View File
@@ -35,3 +35,10 @@ inline clap_version_t clamp_clap_version(clap_version_t version) {
return version;
}
}
template <typename S>
void serialize(S& s, clap_version_t& version) {
s.value4b(version.major);
s.value4b(version.minor);
s.value4b(version.revision);
}