add player.create, test.set_setting, test.sleep_until, world.count_chunks

This commit is contained in:
MihailRis
2024-12-12 15:54:56 +03:00
parent 8a5042f2a2
commit 9ec8788838
10 changed files with 84 additions and 34 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ namespace util {
std::fill(secondBuffer.begin(), secondBuffer.end(), T{});
for (TCoord y = 0; y < sizeY; y++) {
for (TCoord x = 0; x < sizeX; x++) {
auto& value = firstBuffer[y * sizeX + x];
auto value = std::move(firstBuffer[y * sizeX + x]);
auto nx = x - dx;
auto ny = y - dy;
if (value == T{}) {
@@ -40,7 +40,7 @@ namespace util {
valuesCount--;
continue;
}
secondBuffer[ny * sizeX + nx] = value;
secondBuffer[ny * sizeX + nx] = std::move(value);
}
}
std::swap(firstBuffer, secondBuffer);