diff --git a/deps/ox/src/ox/logconn/logconn.cpp b/deps/ox/src/ox/logconn/logconn.cpp index 9adaa5b5..4cfc4b63 100644 --- a/deps/ox/src/ox/logconn/logconn.cpp +++ b/deps/ox/src/ox/logconn/logconn.cpp @@ -7,12 +7,15 @@ */ #ifdef OX_USE_STDLIB -#include +#include + +#ifndef _WIN32 +#include #include #include -#include #include -#include +#endif +#include #include diff --git a/deps/ox/src/ox/model/fieldcounter.hpp b/deps/ox/src/ox/model/fieldcounter.hpp index 9ea8bce8..8bcfa97e 100644 --- a/deps/ox/src/ox/model/fieldcounter.hpp +++ b/deps/ox/src/ox/model/fieldcounter.hpp @@ -67,7 +67,7 @@ consteval auto modelFieldCount() noexcept { auto t = a.allocate(1); detail::FieldCounter c; const auto err = model(&c, t); - oxAssert(err, "Count failed"); + //oxAssert(err, "Count failed"); a.deallocate(t, 1); return c.fields; } diff --git a/deps/ox/src/ox/model/modelhandleradaptor.hpp b/deps/ox/src/ox/model/modelhandleradaptor.hpp index 098f13f1..80797840 100644 --- a/deps/ox/src/ox/model/modelhandleradaptor.hpp +++ b/deps/ox/src/ox/model/modelhandleradaptor.hpp @@ -25,10 +25,18 @@ class ModelHandlerInterface { template constexpr ox::Error setTypeInfo( - const char *name = T::TypeName, - int version = T::TypeVersion, - const Vector &typeParams = {}, - std::size_t fields = ModelFieldCount_v) noexcept { + const char* name = T::TypeName, + int version = T::TypeVersion, + const Vector& typeParams = {}) noexcept { + return m_handler->template setTypeInfo(name, version, typeParams, ModelFieldCount_v); + } + + template + constexpr ox::Error setTypeInfo( + const char* name, + int version, + const Vector& typeParams, + std::size_t fields) noexcept { return m_handler->template setTypeInfo(name, version, typeParams, fields); } diff --git a/deps/ox/src/ox/oc/write.hpp b/deps/ox/src/ox/oc/write.hpp index fe681a2c..db6b5af2 100644 --- a/deps/ox/src/ox/oc/write.hpp +++ b/deps/ox/src/ox/oc/write.hpp @@ -187,9 +187,16 @@ class OrganicClawWriter { template constexpr ox::Error setTypeInfo( const char* = T::TypeName, - int = T::TypeVersion, - const Vector& = {}, - std::size_t = ModelFieldCount_v) noexcept { + int = T::TypeVersion) noexcept { + return {}; + } + + template + constexpr ox::Error setTypeInfo( + const char*, + int, + const Vector&, + std::size_t) noexcept { return {}; } diff --git a/deps/ox/src/ox/preloader/alignmentcatcher.hpp b/deps/ox/src/ox/preloader/alignmentcatcher.hpp index 9464c71a..4dab6b15 100644 --- a/deps/ox/src/ox/preloader/alignmentcatcher.hpp +++ b/deps/ox/src/ox/preloader/alignmentcatcher.hpp @@ -28,9 +28,16 @@ struct AlignmentCatcher: public ModelHandlerBase> { template constexpr ox::Error setTypeInfo( const char* = T::TypeName, - int = T::TypeVersion, - const Vector& = {}, - std::size_t = ModelFieldCount_v) noexcept { + int = T::TypeVersion) noexcept { + return {}; + } + + template + constexpr ox::Error setTypeInfo( + const char*, + int, + const Vector&, + std::size_t) noexcept { return {}; } diff --git a/deps/ox/src/ox/preloader/preloader.hpp b/deps/ox/src/ox/preloader/preloader.hpp index 822daef9..579c26cc 100644 --- a/deps/ox/src/ox/preloader/preloader.hpp +++ b/deps/ox/src/ox/preloader/preloader.hpp @@ -74,9 +74,16 @@ class Preloader: public ModelHandlerBase> { template constexpr ox::Error setTypeInfo( const char* = T::TypeName, - int = T::TypeVersion, - const Vector& = {}, - std::size_t = ModelFieldCount_v) noexcept { + int = T::TypeVersion) noexcept { + return {}; + } + + template + constexpr ox::Error setTypeInfo( + const char*, + int, + const Vector&, + std::size_t) noexcept { return {}; } @@ -246,7 +253,7 @@ constexpr ox::Error Preloader::field(CRStringView, const T **val, std: template constexpr ox::Result Preloader::startAlloc(std::size_t sz) noexcept { oxRequire(a, ox::allocate(&m_writer, sz)); - m_allocStack.emplace_back(m_writer.tellp()); + m_allocStack.emplace_back(static_cast(m_writer.tellp())); oxReturnError(m_writer.seekp(a)); return a; } diff --git a/deps/ox/src/ox/preloader/sizecatcher.hpp b/deps/ox/src/ox/preloader/sizecatcher.hpp index 4e01b3a5..1a5da480 100644 --- a/deps/ox/src/ox/preloader/sizecatcher.hpp +++ b/deps/ox/src/ox/preloader/sizecatcher.hpp @@ -34,9 +34,16 @@ class SizeCatcher: public ModelHandlerBase> { template constexpr ox::Error setTypeInfo( const char* = T::TypeName, - int = T::TypeVersion, - const Vector& = {}, - std::size_t = ModelFieldCount_v) noexcept { + int = T::TypeVersion) noexcept { + return {}; + } + + template + constexpr ox::Error setTypeInfo( + const char*, + int, + const Vector&, + std::size_t) noexcept { return {}; } diff --git a/deps/ox/src/ox/preloader/unionsizecatcher.hpp b/deps/ox/src/ox/preloader/unionsizecatcher.hpp index 2421f66a..cb3317b2 100644 --- a/deps/ox/src/ox/preloader/unionsizecatcher.hpp +++ b/deps/ox/src/ox/preloader/unionsizecatcher.hpp @@ -23,9 +23,16 @@ class UnionSizeCatcher: public ModelHandlerBase> { template constexpr ox::Error setTypeInfo( const char* = T::TypeName, - int = T::TypeVersion, - const Vector& = {}, - std::size_t = ModelFieldCount_v) noexcept { + int = T::TypeVersion) noexcept { + return {}; + } + + template + constexpr ox::Error setTypeInfo( + const char*, + int, + const Vector&, + std::size_t) noexcept { return {}; }