changeset 10556:bb3057c7eed7 draft

(svn r14813) -Codechange: use uint instead of 'just' unsigned.
author rubidium <rubidium@openttd.org>
date Sat, 03 Jan 2009 17:28:22 +0000
parents 315add01cf91
children da88d3f497de
files src/order_base.h src/order_cmd.cpp src/os2.cpp
diffstat 3 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/order_base.h
+++ b/src/order_base.h
@@ -263,10 +263,10 @@
 
 	Order *first;                   ///< First order of the order list
 	VehicleOrderID num_orders;      ///< NOSAVE: How many orders there are in the list
-	unsigned num_vehicles;          ///< NOSAVE: Number of vehicles that share this order list
+	uint num_vehicles;              ///< NOSAVE: Number of vehicles that share this order list
 	Vehicle *first_shared;          ///< NOSAVE: pointer to the first vehicle in the shared order chain
 
-	unsigned timetable_duration;    ///< NOSAVE: Total duration of the order list
+	uint timetable_duration;        ///< NOSAVE: Total duration of the order list
 
 public:
 	/** Default constructor producing an invalid order list. */
@@ -344,7 +344,7 @@
 	 * Return the number of vehicles that share this orders list
 	 * @return the count of vehicles that use this shared orders list
 	 */
-	inline unsigned GetNumVehicles() const { return this->num_vehicles; }
+	inline uint GetNumVehicles() const { return this->num_vehicles; }
 
 	/**
 	 * Checks whether a vehicle is part of the shared vehicle chain.
@@ -384,7 +384,7 @@
 	 * Gets the total duration of the vehicles timetable or -1 is the timetable is not complete.
 	 * @return total timetable duration or -1 for incomplete timetables
 	 */
-	inline int GetTimetableTotalDuration() const { return this->IsCompleteTimetable() ? this->timetable_duration : -1; }
+	inline int GetTimetableTotalDuration() const { return this->IsCompleteTimetable() ? (int)this->timetable_duration : -1; }
 
 	/**
 	 * Gets the known duration of the vehicles timetable even if the timetable is not complete.
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -412,8 +412,8 @@
 void OrderList::DebugCheckSanity() const
 {
 	VehicleOrderID check_num_orders = 0;
-	unsigned check_num_vehicles = 0;
-	unsigned check_timetable_duration = 0;
+	uint check_num_vehicles = 0;
+	uint check_timetable_duration = 0;
 
 	DEBUG(misc, 6, "Checking OrderList %hu for sanity...", this->index);
 
@@ -429,7 +429,7 @@
 		assert(v->orders.list == this);
 	}
 	assert(this->num_vehicles == check_num_vehicles);
-	DEBUG(misc, 6, "... detected %u orders, %u vehicles, %u ticks", (unsigned)this->num_orders,
+	DEBUG(misc, 6, "... detected %u orders, %u vehicles, %u ticks", (uint)this->num_orders,
 	      this->num_vehicles, this->timetable_duration);
 }
 
--- a/src/os2.cpp
+++ b/src/os2.cpp
@@ -39,7 +39,7 @@
 
 void FiosGetDrives()
 {
-	unsigned disk, disk2, save, total;
+	uint disk, disk2, save, total;
 
 #ifndef __INNOTEK_LIBC__
 	_dos_getdrive(&save); // save original drive