[ox/model] Make model friend macro constexpr and noexcept

This commit is contained in:
Gary Talent 2022-02-10 02:06:13 -06:00
parent f4895948e2
commit 5ea36836bd

View File

@ -11,4 +11,4 @@
#define oxModelBegin(modelName) template<typename T> constexpr ox::Error model(T *io, modelName *o) noexcept { io->template setTypeInfo<modelName>(); #define oxModelBegin(modelName) template<typename T> constexpr ox::Error model(T *io, modelName *o) noexcept { io->template setTypeInfo<modelName>();
#define oxModelEnd() return OxError(0); } #define oxModelEnd() return OxError(0); }
#define oxModelField(fieldName) oxReturnError(io->field(#fieldName, &o->fieldName)); #define oxModelField(fieldName) oxReturnError(io->field(#fieldName, &o->fieldName));
#define oxModelFriend(modelName) template<typename T> friend ox::Error model(T*, modelName*) #define oxModelFriend(modelName) template<typename T> friend constexpr ox::Error model(T*, modelName*) noexcept