[ox] MSVC fixes

This commit is contained in:
2023-11-11 17:45:09 -06:00
parent 868adae053
commit 7ee52db6a1
8 changed files with 70 additions and 24 deletions

View File

@@ -28,9 +28,16 @@ struct AlignmentCatcher: public ModelHandlerBase<AlignmentCatcher<PlatSpec>> {
template<typename T>
constexpr ox::Error setTypeInfo(
const char* = T::TypeName,
int = T::TypeVersion,
const Vector<String>& = {},
std::size_t = ModelFieldCount_v<T>) noexcept {
int = T::TypeVersion) noexcept {
return {};
}
template<typename T>
constexpr ox::Error setTypeInfo(
const char*,
int,
const Vector<String>&,
std::size_t) noexcept {
return {};
}

View File

@@ -74,9 +74,16 @@ class Preloader: public ModelHandlerBase<Preloader<PlatSpec>> {
template<typename T>
constexpr ox::Error setTypeInfo(
const char* = T::TypeName,
int = T::TypeVersion,
const Vector<String>& = {},
std::size_t = ModelFieldCount_v<T>) noexcept {
int = T::TypeVersion) noexcept {
return {};
}
template<typename T>
constexpr ox::Error setTypeInfo(
const char*,
int,
const Vector<String>&,
std::size_t) noexcept {
return {};
}
@@ -246,7 +253,7 @@ constexpr ox::Error Preloader<PlatSpec>::field(CRStringView, const T **val, std:
template<typename PlatSpec>
constexpr ox::Result<std::size_t> Preloader<PlatSpec>::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<PlatSpec::PtrType>(m_writer.tellp()));
oxReturnError(m_writer.seekp(a));
return a;
}

View File

@@ -34,9 +34,16 @@ class SizeCatcher: public ModelHandlerBase<SizeCatcher<PlatSpec>> {
template<typename T>
constexpr ox::Error setTypeInfo(
const char* = T::TypeName,
int = T::TypeVersion,
const Vector<String>& = {},
std::size_t = ModelFieldCount_v<T>) noexcept {
int = T::TypeVersion) noexcept {
return {};
}
template<typename T>
constexpr ox::Error setTypeInfo(
const char*,
int,
const Vector<String>&,
std::size_t) noexcept {
return {};
}

View File

@@ -23,9 +23,16 @@ class UnionSizeCatcher: public ModelHandlerBase<UnionSizeCatcher<PlatSpec>> {
template<typename T>
constexpr ox::Error setTypeInfo(
const char* = T::TypeName,
int = T::TypeVersion,
const Vector<String>& = {},
std::size_t = ModelFieldCount_v<T>) noexcept {
int = T::TypeVersion) noexcept {
return {};
}
template<typename T>
constexpr ox::Error setTypeInfo(
const char*,
int,
const Vector<String>&,
std::size_t) noexcept {
return {};
}