Prefer pre-increment/decrement operators in for loops

This commit is contained in:
Rangi42
2025-07-24 18:08:17 -04:00
parent c6d0e8de63
commit d6a28a6259
15 changed files with 48 additions and 48 deletions

View File

@@ -112,7 +112,7 @@ struct Palette {
// Flipping tends to happen fairly often, so take a bite out of dcache to speed it up
static std::array<uint16_t, 256> flipTable = ([]() constexpr {
std::array<uint16_t, 256> table{};
for (uint16_t i = 0; i < table.size(); i++) {
for (uint16_t i = 0; i < table.size(); ++i) {
// To flip all the bits, we'll flip both nibbles, then each nibble half, etc.
uint16_t byte = i;
byte = (byte & 0b0000'1111) << 4 | (byte & 0b1111'0000) >> 4;