1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 04:59:11 +00:00

Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761)

This commit is contained in:
Patric Stout
2023-08-12 20:14:21 +02:00
committed by GitHub
parent 0238a2b567
commit 299570b2c1
55 changed files with 390 additions and 203 deletions

View File

@@ -1922,6 +1922,12 @@ static bool OrderConditionCompare(OrderConditionComparator occ, int variable, in
}
}
template <typename T, std::enable_if_t<std::is_base_of<StrongTypedefBase, T>::value, int> = 0>
static bool OrderConditionCompare(OrderConditionComparator occ, T variable, int value)
{
return OrderConditionCompare(occ, static_cast<typename T::BaseType>(variable), value);
}
/**
* Process a conditional order and determine the next order.
* @param order the order the vehicle currently has