Silence narrowing cast warning in OrderList::GetNumOrders() in MSVC

This commit is contained in:
Jonathan G Rennison
2019-12-18 20:38:04 +00:00
parent 0704fb81a3
commit a682d330c7

View File

@@ -639,7 +639,7 @@ public:
* Get number of orders in the order list. * Get number of orders in the order list.
* @return number of orders in the chain. * @return number of orders in the chain.
*/ */
inline VehicleOrderID GetNumOrders() const { return this->order_index.size(); } inline VehicleOrderID GetNumOrders() const { return static_cast<VehicleOrderID>(this->order_index.size()); }
/** /**
* Get number of manually added orders in the order list. * Get number of manually added orders in the order list.