1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-21 11:22:45 +01:00

Codechange: replace memcpy with std::copy_n

This commit is contained in:
Rubidium
2025-05-08 19:42:57 +02:00
committed by rubidium42
parent a45f23686d
commit a48a5f0cc6
20 changed files with 41 additions and 39 deletions

View File

@@ -225,7 +225,7 @@ Sprite *Blitter_8bppOptimized::Encode(SpriteType sprite_type, const SpriteLoader
dest_sprite->width = root_sprite.width;
dest_sprite->x_offs = root_sprite.x_offs;
dest_sprite->y_offs = root_sprite.y_offs;
memcpy(dest_sprite->data, temp_dst, size);
std::copy_n(reinterpret_cast<std::byte *>(temp_dst), size, dest_sprite->data);
return dest_sprite;
}