[ox] General cleanup and updating to newer coding standards

(synced from 161780cb91)
This commit is contained in:
2021-04-20 01:55:40 -05:00
parent 24f6639c27
commit 7b0a52c469
14 changed files with 95 additions and 86 deletions
+1 -2
View File
@@ -255,8 +255,7 @@ Error MetalClawReader::field(const char* name, ox::Vector<T> *val) {
if (m_unionIdx == -1 || m_unionIdx == m_field) {
// set size of val if the field is present, don't worry about it if not
if (m_fieldPresence.get(m_field)) {
const auto [len, err] = arrayLength(name, false);
oxReturnError(err);
oxRequire(len, arrayLength(name, false));
val->resize(len);
}
return field(name, val->data(), val->size());