[nostalgia,keel] Make repair return ox::Error

This commit is contained in:
2024-06-01 15:54:11 -05:00
parent 0d7b89a025
commit 6cbafc75bf
2 changed files with 5 additions and 8 deletions
@@ -75,15 +75,12 @@ constexpr bool valid(Palette const&p) noexcept {
}
[[nodiscard]]
constexpr bool repair(Palette &p) noexcept {
constexpr ox::Error repair(Palette &p) noexcept {
auto const colors = p.colorInfo.size();
if (p.pages.size() == 0) {
p.pages.emplace_back();
}
for (auto &page : p.pages) {
page.resize(colors);
}
return true;
return {};
}
[[nodiscard]]