[ox] Cleanup

This commit is contained in:
Gary Talent 2023-05-30 20:50:47 -05:00
parent 90ef5866dd
commit fa4e3c6329

View File

@ -153,24 +153,23 @@ class UUID {
UUIDStr *out, UUIDStr *out,
const Array<uint8_t, 16> &value, const Array<uint8_t, 16> &value,
std::size_t cnt, std::size_t cnt,
unsigned valueI) { unsigned &valueI) {
for (auto i = 0u; i < cnt; ++i) { for (auto i = 0u; i < cnt; ++i) {
const auto v = value[valueI]; const auto v = value[valueI];
const auto h = detail::toHex(v); const auto h = detail::toHex(v);
oxIgnoreError(out->append(h.c_str(), h.len())); oxIgnoreError(out->append(h.c_str(), h.len()));
++valueI; ++valueI;
} }
return valueI;
}; };
valueI = printChars(&out, m_value, 4, valueI); printChars(&out, m_value, 4, valueI);
out += "-"; out += "-";
valueI = printChars(&out, m_value, 2, valueI); printChars(&out, m_value, 2, valueI);
out += "-"; out += "-";
valueI = printChars(&out, m_value, 2, valueI); printChars(&out, m_value, 2, valueI);
out += "-"; out += "-";
valueI = printChars(&out, m_value, 2, valueI); printChars(&out, m_value, 2, valueI);
out += "-"; out += "-";
valueI = printChars(&out, m_value, 6, valueI); printChars(&out, m_value, 6, valueI);
return out; return out;
} }
}; };