mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Keep more non-declaration initialization within the for loop clause
This commit is contained in:
+1
-2
@@ -175,8 +175,7 @@ void reverse() {
|
||||
// Pick the smallest width that will result in a landscape-aspect rectangular image.
|
||||
// Thus a prime number of tiles will result in a horizontal row.
|
||||
// This avoids redundancy with `-r 1` which results in a vertical column.
|
||||
width = static_cast<size_t>(ceil(sqrt(mapSize)));
|
||||
for (; width < mapSize; ++width) {
|
||||
for (width = static_cast<size_t>(ceil(sqrt(mapSize))); width < mapSize; ++width) {
|
||||
if (mapSize % width == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user