Merge commit '9c712cc38ae706b021807b271899bce56c234fa5'
This commit is contained in:
commit
a60cdf0a61
6
deps/ox/src/ox/preloader/preloader.hpp
vendored
6
deps/ox/src/ox/preloader/preloader.hpp
vendored
@ -174,26 +174,20 @@ constexpr ox::Error Preloader<PlatSpec>::field(CRStringView name, const T *val)
|
||||
}
|
||||
oxReturnError(pad(val));
|
||||
if constexpr(ox::is_integral_v<T>) {
|
||||
//oxDebug(" integral");
|
||||
//oxDebugf("Preloader::field(name, val): {}", name);
|
||||
return ox::serialize(&m_writer, PlatSpec::correctEndianness(*val));
|
||||
} else if constexpr(ox::is_pointer_v<T>) {
|
||||
//oxDebug(" pointer");
|
||||
const PtrType a = startAlloc(sizeOf<PlatSpec>(val), alignOf<PlatSpec>(*val), m_writer.tellp()) + PlatSpec::RomStart;
|
||||
oxReturnError(field(name, *val));
|
||||
oxReturnError(endAlloc());
|
||||
return ox::serialize(&m_writer, PlatSpec::correctEndianness(a));
|
||||
} else if constexpr(ox::isVector_v<T>) {
|
||||
//oxDebug(" vector");
|
||||
return fieldVector(name, val);
|
||||
} else if constexpr(ox::is_same_v<T, ox::ModelValueVector>) {
|
||||
val->types();
|
||||
//oxDebug(" vector");
|
||||
return fieldVector(name, val);
|
||||
} else if constexpr(ox::is_same_v<T, ox::ModelValueArray>) {
|
||||
return fieldArray(name, val);
|
||||
} else {
|
||||
//oxDebug(" object");
|
||||
m_unionIdx.emplace_back(-1);
|
||||
const auto out = preload<PlatSpec, T>(this, val);
|
||||
m_unionIdx.pop_back();
|
||||
|
@ -34,6 +34,7 @@ static ox::Error pathToInode(
|
||||
}
|
||||
oxRequire(s, dest.stat(path));
|
||||
oxReturnError(o["type"].set(static_cast<int8_t>(ox::FileAddressType::Inode)));
|
||||
oxOutf("path to inode: {} => {}\n", path, s.inode);
|
||||
return data.set(2, s.inode);
|
||||
}
|
||||
|
||||
|
@ -82,6 +82,7 @@ void ClawEditor::drawRow(ox::ModelValue const&value) noexcept {
|
||||
case ox::ModelValue::Type::Union:
|
||||
type = "union";
|
||||
break;
|
||||
case ox::ModelValue::Type::InlineArray:
|
||||
case ox::ModelValue::Type::Vector:
|
||||
type = "list";
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user