Changeset - r10556:998eabe6aeec
[Not reviewed]
master
0 3 0
rubidium - 16 years ago 2009-01-03 17:28:22
rubidium@openttd.org
(svn r14813) -Codechange: use uint instead of 'just' unsigned.
3 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/order_base.h
Show inline comments
 
@@ -260,16 +260,16 @@ struct OrderList : PoolItem<OrderList, O
 
private:
 
	friend void AfterLoadVehicles(bool part_of_load); ///< For instantiating the shared vehicle chain
 
	friend const struct SaveLoad *GetOrderListDescription(); ///< Saving and loading of order lists.
 

	
 
	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. */
 
	OrderList()
 
		: first(NULL), num_orders(INVALID_VEH_ORDER_ID), num_vehicles(0), first_shared(NULL),
 
		  timetable_duration(0) { }
 
@@ -341,13 +341,13 @@ public:
 
	inline Vehicle *GetFirstSharedVehicle() const { return this->first_shared; }
 

	
 
	/**
 
	 * 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.
 
	 * @param v is the vehicle to search in the shared vehicle chain.
 
	 */
 
	bool IsVehicleInSharedOrdersList(const Vehicle *v) const;
 
@@ -381,13 +381,13 @@ public:
 
	bool IsCompleteTimetable() const;
 

	
 
	/**
 
	 * 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.
 
	 * @return known timetable duration
 
	 */
 
	inline int GetTimetableDurationIncomplete() const { return this->timetable_duration; }
src/order_cmd.cpp
Show inline comments
 
@@ -409,14 +409,14 @@ bool OrderList::IsCompleteTimetable() co
 
	return true;
 
}
 

	
 
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);
 

	
 
	for (const Order *o = this->first; o != NULL; o = o->next) {
 
		++check_num_orders;
 
		check_timetable_duration += o->wait_time + o->travel_time;
 
@@ -426,13 +426,13 @@ void OrderList::DebugCheckSanity() const
 

	
 
	for (const Vehicle *v = this->first_shared; v != NULL; v = v->NextShared()) {
 
		++check_num_vehicles;
 
		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);
 
}
 

	
 
/**
 
 * Delete all news items regarding defective orders about a vehicle
 
 * This could kill still valid warnings (for example about void order when just
src/os2.cpp
Show inline comments
 
@@ -36,13 +36,13 @@ bool FiosIsRoot(const char *file)
 
{
 
	return file[3] == '\0';
 
}
 

	
 
void FiosGetDrives()
 
{
 
	unsigned disk, disk2, save, total;
 
	uint disk, disk2, save, total;
 

	
 
#ifndef __INNOTEK_LIBC__
 
	_dos_getdrive(&save); // save original drive
 
#else
 
	save = _getdrive(); // save original drive
 
	char wd[MAX_PATH];
0 comments (0 inline, 0 general)