diff --git a/src/nostalgia/core/glfw/core.cpp b/src/nostalgia/core/glfw/core.cpp index 86c6b80c..ac2bc62d 100644 --- a/src/nostalgia/core/glfw/core.cpp +++ b/src/nostalgia/core/glfw/core.cpp @@ -2,12 +2,10 @@ * Copyright 2016 - 2023 Gary Talent (gary@drinkingtea.net). All rights reserved. */ -#include #include #include #include -#include #include #include "core.hpp" diff --git a/src/nostalgia/core/tilesheet.hpp b/src/nostalgia/core/tilesheet.hpp index ddcddf0d..aa5270bd 100644 --- a/src/nostalgia/core/tilesheet.hpp +++ b/src/nostalgia/core/tilesheet.hpp @@ -130,13 +130,13 @@ struct TileSheet { * Reads all pixels of this sheet or its children into the given pixel list * @param pixels */ - constexpr void readPixelsTo(ox::Vector *pPixels, int8_t bpp) const noexcept { - if (subsheets.size()) { + constexpr void readPixelsTo(ox::Vector *pPixels, int8_t pBpp) const noexcept { + if (!subsheets.empty()) { for (auto &s: subsheets) { s.readPixelsTo(pPixels); } } else { - if (bpp == 4) { + if (pBpp == 4) { for (auto p: this->pixels) { pPixels->emplace_back(p & 0b1111); pPixels->emplace_back(p >> 4); @@ -154,7 +154,7 @@ struct TileSheet { * @param pixels */ constexpr void readPixelsTo(ox::Vector *pPixels) const noexcept { - if (subsheets.size()) { + if (!subsheets.empty()) { for (auto &s: subsheets) { s.readPixelsTo(pPixels); } @@ -384,7 +384,7 @@ struct TileSheet { const auto currentIdx = pIdx[pIdxIt]; if (pSubsheet->subsheets.size() <= currentIdx) { auto out = pIdx; - if (pSubsheet->subsheets.size()) { + if (!pSubsheet->subsheets.empty()) { out.back().value = pSubsheet->subsheets.size() - 1; } else { out.pop_back();