[ox/model] Fix null ptr use when describing nested Vectors
This commit is contained in:
parent
8e956c68b3
commit
ea7ccf40b1
4
deps/ox/src/ox/model/descwrite.hpp
vendored
4
deps/ox/src/ox/model/descwrite.hpp
vendored
@ -39,7 +39,7 @@ template<typename T, std::size_t sz>
|
|||||||
constexpr int indirectionLevels_v<T[sz]> = 1 + indirectionLevels_v<T>;
|
constexpr int indirectionLevels_v<T[sz]> = 1 + indirectionLevels_v<T>;
|
||||||
|
|
||||||
template<typename T, std::size_t SmallVecSz>
|
template<typename T, std::size_t SmallVecSz>
|
||||||
constexpr int indirectionLevels_v<::ox::Vector<T, SmallVecSz>> = 1 + indirectionLevels_v<typename T::value_type>;
|
constexpr int indirectionLevels_v<::ox::Vector<T, SmallVecSz>> = 1 + indirectionLevels_v<T>;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr auto buildSubscriptStack(const T*, SubscriptStack*) noexcept {
|
constexpr auto buildSubscriptStack(const T*, SubscriptStack*) noexcept {
|
||||||
@ -246,7 +246,7 @@ constexpr Error TypeDescWriter::fieldCString(CRStringView name, Args&&...) noexc
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
constexpr const DescriptorType *TypeDescWriter::type(const T *val) const noexcept {
|
constexpr const DescriptorType *TypeDescWriter::type(const T *val) const noexcept {
|
||||||
if constexpr(isVector_v<T>) {
|
if constexpr(isVector_v<T>) {
|
||||||
return type(val->data());
|
return type(static_cast<typename T::value_type*>(nullptr));
|
||||||
} else {
|
} else {
|
||||||
auto [t, err] = m_typeStore->template get<T>();
|
auto [t, err] = m_typeStore->template get<T>();
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user