[ox/mc] Fix more Clang issues
This commit is contained in:
parent
db961739ad
commit
e6803af22f
19
deps/ox/src/ox/model/modelhandleradaptor.hpp
vendored
19
deps/ox/src/ox/model/modelhandleradaptor.hpp
vendored
@ -47,7 +47,11 @@ class ModelHandlerInterface {
|
||||
|
||||
template<std::size_t len>
|
||||
constexpr Error fieldCString(const char *name, const char val[len]) noexcept requires(opType_v != OpType::Read) {
|
||||
if constexpr(opType_v != OpType::Read) {
|
||||
return m_handler->fieldCString(name, &val[0], len);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
constexpr Error fieldCString(const char *name, char **val) noexcept {
|
||||
@ -55,11 +59,21 @@ class ModelHandlerInterface {
|
||||
}
|
||||
|
||||
constexpr Error fieldCString(const char *name, const char *const*val) noexcept requires(opType_v != OpType::Read) {
|
||||
// this check looks pointless, but it's to address a Clang bug
|
||||
if constexpr(opType_v != OpType::Read) {
|
||||
return m_handler->fieldCString(name, val);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
constexpr Error fieldCString(const char *name, const char **val) noexcept requires(opType_v != OpType::Read) {
|
||||
// this check looks pointless, but it's to address a Clang bug
|
||||
if constexpr(opType_v != OpType::Read) {
|
||||
return m_handler->fieldCString(name, val);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
constexpr Error fieldCString(const char *name, char **val, std::size_t buffLen) noexcept {
|
||||
@ -67,7 +81,12 @@ class ModelHandlerInterface {
|
||||
}
|
||||
|
||||
constexpr Error fieldCString(const char *name, const char **val, std::size_t buffLen) noexcept requires(opType_v != OpType::Read) {
|
||||
// this check looks pointless, but it's to address a Clang bug
|
||||
if constexpr(opType_v != OpType::Read) {
|
||||
return m_handler->fieldCString(name, val, buffLen);
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
constexpr Error fieldCString(const char *name, char *val, std::size_t buffLen) noexcept {
|
||||
|
Loading…
Reference in New Issue
Block a user