[ox/mc] Add writer fieldString function

This commit is contained in:
Gary Talent 2022-02-03 00:38:18 -06:00
parent 57164c1811
commit 395e262e3e
3 changed files with 8 additions and 0 deletions

View File

@ -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;
} }

View File

@ -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;

View File

@ -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;