[ox] Make OC and Claw writers take const values

This commit is contained in:
2023-06-08 21:38:02 -05:00
parent 23054c9f6f
commit 5a021043f4
6 changed files with 15 additions and 14 deletions

View File

@ -72,7 +72,7 @@ constexpr int getTypeVersion(const T *t) noexcept {
}
template<typename T>
ox::Error writeClawHeader(Writer_c auto &writer, T *t, ClawFormat fmt) noexcept {
ox::Error writeClawHeader(Writer_c auto &writer, const T *t, ClawFormat fmt) noexcept {
switch (fmt) {
case ClawFormat::Metal:
oxReturnError(write(&writer, "M2;"));
@ -96,7 +96,7 @@ ox::Error writeClawHeader(Writer_c auto &writer, T *t, ClawFormat fmt) noexcept
}
Result<Buffer> writeClaw(
auto &t,
const auto &t,
ClawFormat fmt = ClawFormat::Metal,
std::size_t buffReserveSz = 2 * units::KB) noexcept {
Buffer out(buffReserveSz);