1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2025-12-10 06:52:05 +01:00

Codefix 0455627d16: Don't make temporary copies of order when converting old orders. (#14808)

This commit is contained in:
Peter Nelson
2025-11-21 17:26:12 +00:00
committed by GitHub
parent 9237685f4c
commit 821a496495

View File

@@ -191,7 +191,7 @@ struct ORDRChunkHandler : ChunkHandler {
/* Update all the next pointer. The orders were built like this:
* While the order is valid, the previous order will get its next pointer set */
for (uint32_t num = 1; OldOrderSaveLoadItem item : _old_order_saveload_pool) {
for (uint32_t num = 1; const OldOrderSaveLoadItem &item : _old_order_saveload_pool) {
if (!item.order.IsType(OT_NOTHING) && num > 1) {
OldOrderSaveLoadItem *prev = GetOldOrder(num - 1);
if (prev != nullptr) prev->next = num;