1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 01:12:39 +01:00

Codechange: use std::byte instead of char for calculating arbitrary byte offsets

This commit is contained in:
Rubidium
2025-05-01 16:35:22 +02:00
committed by rubidium42
parent 932dca927b
commit f2a32c6d13
2 changed files with 12 additions and 12 deletions

View File

@@ -289,7 +289,7 @@ static bool LoadIntList(std::optional<std::string_view> str, void *array, int ne
auto opt_items = ParseIntList(*str);
if (!opt_items.has_value() || opt_items->size() != (size_t)nelems) return false;
char *p = static_cast<char *>(array);
std::byte *p = static_cast<std::byte *>(array);
for (auto item : *opt_items) {
WriteValue(p, type, item);
p += elem_size;