From 0dc0eccdcba18b542066ddb10f9b8d47416b27d3 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Thu, 5 Oct 2023 07:29:59 +0100 Subject: [PATCH] Codechange: Use std::array::fill. --- src/newgrf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 37bbb4c3e7..239202189f 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -8850,7 +8850,7 @@ void ResetPersistentNewGRFData() */ static void BuildCargoTranslationMap() { - std::fill(std::begin(_cur.grffile->cargo_map), std::end(_cur.grffile->cargo_map), uint8_t{UINT8_MAX}); + _cur.grffile->cargo_map.fill(UINT8_MAX); for (CargoID c = 0; c < NUM_CARGO; c++) { const CargoSpec *cs = CargoSpec::Get(c);