[ox] Cleanup Vector

This commit is contained in:
2023-06-13 23:51:13 -05:00
parent 20e5b7e617
commit dde51151ff
5 changed files with 125 additions and 65 deletions

View File

@@ -271,7 +271,7 @@ constexpr ox::Error Preloader<PlatSpec>::endAlloc() noexcept {
if (m_allocStack.empty()) {
return m_writer.seekp(0, ox::ios_base::end);
}
const auto &si = m_allocStack.back().unwrap();
const auto &si = *m_allocStack.back().unwrap();
oxReturnError(m_writer.seekp(si.restore, si.seekdir));
m_allocStack.pop_back();
return {};
@@ -354,7 +354,7 @@ constexpr ox::Error Preloader<PlatSpec>::fieldVector(
template<typename PlatSpec>
constexpr bool Preloader<PlatSpec>::unionCheckAndIt() noexcept {
auto &u = m_unionIdx.back().unwrap();
auto &u = *m_unionIdx.back().unwrap();
return u.checkAndIterate();
}