[ox/mc] Add writer fieldString function
This commit is contained in:
parent
57164c1811
commit
395e262e3e
4
deps/ox/src/ox/mc/write.cpp
vendored
4
deps/ox/src/ox/mc/write.cpp
vendored
@ -90,6 +90,10 @@ Error MetalClawWriter::field(const char*, SerStr val) noexcept {
|
|||||||
return OxError(0);
|
return OxError(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Error MetalClawWriter::fieldCString(const char *name, char **val, int len) noexcept {
|
||||||
|
return field(name, SerStr(val, len));
|
||||||
|
}
|
||||||
|
|
||||||
std::size_t MetalClawWriter::size() const noexcept {
|
std::size_t MetalClawWriter::size() const noexcept {
|
||||||
return m_buffIt;
|
return m_buffIt;
|
||||||
}
|
}
|
||||||
|
2
deps/ox/src/ox/mc/write.hpp
vendored
2
deps/ox/src/ox/mc/write.hpp
vendored
@ -68,6 +68,8 @@ class MetalClawWriter {
|
|||||||
|
|
||||||
Error field(const char*, SerStr val) noexcept;
|
Error field(const char*, SerStr val) noexcept;
|
||||||
|
|
||||||
|
Error fieldCString(const char *name, char **val, int len) noexcept;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
Error field(const char*, T *val) noexcept;
|
Error field(const char*, T *val) noexcept;
|
||||||
|
|
||||||
|
2
deps/ox/src/ox/oc/write.hpp
vendored
2
deps/ox/src/ox/oc/write.hpp
vendored
@ -63,6 +63,8 @@ class OrganicClawWriter {
|
|||||||
|
|
||||||
Error field(const char*, SerStr val) noexcept;
|
Error field(const char*, SerStr val) noexcept;
|
||||||
|
|
||||||
|
Error fieldCString(const char *name, char **val, int len) noexcept;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
Error field(const char*, T *val) noexcept;
|
Error field(const char*, T *val) noexcept;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user