Changeset - r16154:2589af63711f
[Not reviewed]
master
0 9 0
smatz - 14 years ago 2010-10-01 16:42:28
smatz@openttd.org
(svn r20860) -Cleanup: remove some unused functions and variables
9 files changed with 5 insertions and 56 deletions:
0 comments (0 inline, 0 general)
src/company_gui.cpp
Show inline comments
 
@@ -35,8 +35,6 @@
 
#include "table/strings.h"
 

	
 
/** Company GUI constants. */
 
static const int FIRST_GUI_CALL = INT_MAX; ///< default value to specify this is the first call of the resizable gui
 

	
 
static const uint EXP_LINESPACE  = 2;      ///< Amount of vertical space for a horizontal (sub-)total line.
 
static const uint EXP_BLOCKSPACE = 10;     ///< Amount of vertical space between two blocks of numbers.
 

	
src/economy.cpp
Show inline comments
 
@@ -71,22 +71,6 @@ static inline int32 BigMulS(const int32 
 
	return (int32)((int64)a * (int64)b >> shift);
 
}
 

	
 
/**
 
 * Multiply two unsigned integers and shift the results to right.
 
 *
 
 * This function multiplies two unsigned integers. The result is
 
 * shifted by the amount of shift to right.
 
 *
 
 * @param a The first unsigned integer
 
 * @param b The second unsigned integer
 
 * @param shift The amount to shift the value to right.
 
 * @return The shifted result
 
 */
 
static inline uint32 BigMulSU(const uint32 a, const uint32 b, const uint8 shift)
 
{
 
	return (uint32)((uint64)a * (uint64)b >> shift);
 
}
 

	
 
typedef SmallVector<Industry *, 16> SmallIndustryList;
 

	
 
/**
src/pathfinder/npf/aystar.cpp
Show inline comments
 
@@ -29,9 +29,6 @@
 
#include "../../core/alloc_func.hpp"
 
#include "aystar.h"
 

	
 
static int _aystar_stats_open_size;
 
static int _aystar_stats_closed_size;
 

	
 
/* This looks in the Hash if a node exists in ClosedList
 
 *  If so, it returns the PathNode, else NULL */
 
static PathNode *AyStarMain_ClosedList_IsInList(AyStar *aystar, const AyStarNode *node)
 
@@ -257,8 +254,6 @@ int AyStarMain_Main(AyStar *aystar)
 
#endif
 
	if (r != AYSTAR_STILL_BUSY) {
 
		/* We're done, clean up */
 
		_aystar_stats_open_size = aystar->OpenListHash.size;
 
		_aystar_stats_closed_size = aystar->ClosedListHash.size;
 
		aystar->clear(aystar);
 
	}
 

	
src/roadveh_cmd.cpp
Show inline comments
 
@@ -1251,8 +1251,7 @@ again:
 
		Trackdir dir;
 
		uint turn_around_start_frame = RVC_TURN_AROUND_START_FRAME;
 

	
 
		RoadBits tram;
 
		if (v->roadtype == ROADTYPE_TRAM && !IsRoadDepotTile(v->tile) && HasExactlyOneBit(tram = GetAnyRoadBits(v->tile, ROADTYPE_TRAM, true))) {
 
		if (v->roadtype == ROADTYPE_TRAM && !IsRoadDepotTile(v->tile) && HasExactlyOneBit(GetAnyRoadBits(v->tile, ROADTYPE_TRAM, true))) {
 
			/*
 
			 * The tram is turning around with one tram 'roadbit'. This means that
 
			 * it is using the 'big' corner 'drive data'. However, to support the
src/saveload/engine_sl.cpp
Show inline comments
 
@@ -137,11 +137,9 @@ static void Save_EIDS()
 

	
 
static void Load_EIDS()
 
{
 
	int index;
 

	
 
	_engine_mngr.Clear();
 

	
 
	while ((index = SlIterateArray()) != -1) {
 
	while (SlIterateArray() != -1) {
 
		EngineIDMapping *eid = _engine_mngr.Append();
 
		SlObject(eid, _engine_id_mapping_desc);
 
	}
src/saveload/labelmaps_sl.cpp
Show inline comments
 
@@ -109,9 +109,8 @@ static void Load_RAIL()
 
	_railtype_list.Clear();
 

	
 
	LabelObject lo;
 
	int index;
 

	
 
	while ((index = SlIterateArray()) != -1) {
 
	while (SlIterateArray() != -1) {
 
		SlObject(&lo, _label_object_desc);
 
		*_railtype_list.Append() = (RailTypeLabel)lo.label;
 
	}
src/settings.cpp
Show inline comments
 
@@ -1949,17 +1949,6 @@ static void LoadSettings(const SettingDe
 
}
 

	
 
/**
 
 * Loadhandler for a list of global variables
 
 * @param sdg pointer for the global variable list SettingDescGlobVarList
 
 * @note this is actually a stub for LoadSettings with the
 
 * object pointer set to NULL
 
 */
 
static inline void LoadSettingsGlobList(const SettingDescGlobVarList *sdg)
 
{
 
	LoadSettings((const SettingDesc*)sdg, NULL);
 
}
 

	
 
/**
 
 * Save and load handler for settings
 
 * @param sd SettingDesc struct containing all information
 
 * @param object can be either NULL in which case we load global variables or
 
@@ -1982,16 +1971,6 @@ static void SaveSettings(const SettingDe
 
	}
 
}
 

	
 
/**
 
 * Savehandler for a list of global variables
 
 * @note this is actually a stub for SaveSettings with the
 
 * object pointer set to NULL
 
 */
 
static inline void SaveSettingsGlobList(const SettingDescGlobVarList *sdg)
 
{
 
	SaveSettings((const SettingDesc*)sdg, NULL);
 
}
 

	
 
static void Load_OPTS()
 
{
 
	/* Copy over default setting since some might not get loaded in
src/thread/thread_pthread.cpp
Show inline comments
 
@@ -71,7 +71,7 @@ private:
 
		/* Call the proc of the creator to continue this thread */
 
		try {
 
			this->proc(this->param);
 
		} catch (OTTDThreadExitSignal e) {
 
		} catch (OTTDThreadExitSignal) {
 
		} catch (...) {
 
			NOT_REACHED();
 
		}
src/town_cmd.cpp
Show inline comments
 
@@ -51,8 +51,6 @@
 
#include "table/strings.h"
 
#include "table/town_land.h"
 

	
 
static Town *_cleared_town;
 
static int _cleared_town_rating;
 
TownID _new_town_id;
 

	
 
/* Initialize the town-pool */
 
@@ -542,8 +540,7 @@ static CommandCost ClearTile_Town(TileIn
 
	cost.AddCost(hs->GetRemovalCost());
 

	
 
	int rating = hs->remove_rating_decrease;
 
	_cleared_town_rating += rating;
 
	Town *t = _cleared_town = Town::GetByTile(tile);
 
	Town *t = Town::GetByTile(tile);
 

	
 
	if (Company::IsValidID(_current_company)) {
 
		if (rating > t->ratings[_current_company] && !(flags & DC_NO_TEST_TOWN_RATING) && !_cheats.magic_bulldozer.value) {
0 comments (0 inline, 0 general)