mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r20860) -Cleanup: remove some unused functions and variables
This commit is contained in:
parent
7f5f4950d7
commit
77fe95f552
|
@ -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.
|
||||
|
||||
|
|
|
@ -71,22 +71,6 @@ static inline int32 BigMulS(const int32 a, const int32 b, const uint8 shift)
|
|||
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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1948,17 +1948,6 @@ static void LoadSettings(const SettingDesc *osd, void *object)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
@ -1982,16 +1971,6 @@ static void SaveSettings(const SettingDesc *sd, void *object)
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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(TileIndex tile, DoCommandFlag flags)
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue