Merge commit '057272347486efe5046691f32f51604e3a594e6a'
This commit is contained in:
4
deps/nostalgia/deps/ox/src/ox/oc/write.hpp
vendored
4
deps/nostalgia/deps/ox/src/ox/oc/write.hpp
vendored
@ -27,7 +27,7 @@ class OrganicClawWriter {
|
||||
friend Result<Buffer> writeOC(const auto &val) noexcept;
|
||||
|
||||
protected:
|
||||
Json::Value m_json;
|
||||
Json::Value m_json{Json::Value(Json::objectValue)};
|
||||
Json::ArrayIndex m_fieldIt = 0;
|
||||
int m_unionIdx = -1;
|
||||
|
||||
@ -215,7 +215,7 @@ Error OrganicClawWriter::field(const char *key, const T *val) noexcept {
|
||||
OrganicClawWriter w;
|
||||
ModelHandlerInterface<OrganicClawWriter, OpType::Write> handler{&w};
|
||||
oxReturnError(model(&handler, val));
|
||||
if (!w.m_json.isNull()) {
|
||||
if (!w.m_json.empty() || m_json.isArray()) {
|
||||
value(key) = w.m_json;
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ constexpr std::size_t alignOf(const T &v) noexcept {
|
||||
typename PlatSpec::PtrType p = 0;
|
||||
return PlatSpec::alignOf(p);
|
||||
} else {
|
||||
AlignmentCatcher<NativePlatSpec> c;
|
||||
AlignmentCatcher<PlatSpec> c;
|
||||
oxAssert(model(c.interface(), &v), "Could not get alignment for type");
|
||||
return c.biggestAlignment;
|
||||
}
|
||||
|
Reference in New Issue
Block a user