[ox/oc] Remove some unnecessary code
All checks were successful
Build / build (push) Successful in 2m3s
All checks were successful
Build / build (push) Successful in 2m3s
This commit is contained in:
parent
6b774ec285
commit
67543af806
16
deps/ox/src/ox/oc/write.hpp
vendored
16
deps/ox/src/ox/oc/write.hpp
vendored
@ -201,21 +201,7 @@ Error OrganicClawWriter::field(const char *key, const T *val, std::size_t len) n
|
||||
for (std::size_t i = 0; i < len; ++i) {
|
||||
oxReturnError(handler.field({}, &val[i]));
|
||||
}
|
||||
if (w.m_json.isNull()) {
|
||||
if constexpr(is_same_v<T, bool>) {
|
||||
value(key) = Json::booleanValue;
|
||||
} else if constexpr(is_integral_v<T>) {
|
||||
value(key) = Json::intValue;
|
||||
} else if constexpr(isOxString_v<T>) {
|
||||
value(key) = Json::stringValue;
|
||||
} else if constexpr(isArray_v<T>) {
|
||||
value(key) = Json::arrayValue;
|
||||
} else {
|
||||
value(key) = Json::objectValue;
|
||||
}
|
||||
} else {
|
||||
value(key) = w.m_json;
|
||||
}
|
||||
value(key) = w.m_json;
|
||||
}
|
||||
++m_fieldIt;
|
||||
return OxError(0);
|
||||
|
Loading…
Reference in New Issue
Block a user