(svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)
authorsmatz
Tue, 07 Oct 2008 20:57:41 +0000
changeset 10225 eb61dd8101c1
parent 10224 422d31f4559f
child 10226 8a3f10afb85e
(svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker)
src/ai/default/default.cpp
src/command.cpp
src/company_cmd.cpp
src/company_func.h
src/company_gui.h
src/rail.h
src/vehicle.cpp
--- a/src/ai/default/default.cpp	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/ai/default/default.cpp	Tue Oct 07 20:57:41 2008 +0000
@@ -293,7 +293,7 @@
 	return AiChooseTrainToBuild(v->u.rail.railtype, avail_money, 0, v->tile);
 }
 
-static EngineID AiChooseShipToReplaceWith(const Company *p, const Vehicle *v)
+static EngineID AiChooseShipToReplaceWith(const Company *c, const Vehicle *v)
 {
 	/* Ships are not implemented in this (broken) AI */
 	return INVALID_ENGINE;
--- a/src/command.cpp	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/command.cpp	Tue Oct 07 20:57:41 2008 +0000
@@ -590,10 +590,10 @@
 	 * @todo Rewrite (dedicated) server to something more than a dirty hack!
 	 */
 	if (_networking && !(cmd & CMD_NETWORK_COMMAND)) {
-		CompanyID pbck = _local_company;
-		if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
+		CompanyID bck = _local_company;
+		if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = COMPANY_FIRST;
 		NetworkSend_Command(tile, p1, p2, cmd, callback);
-		if (_network_dedicated || (_network_server && pbck == COMPANY_SPECTATOR)) _local_company = pbck;
+		if (_network_dedicated || (_network_server && bck == COMPANY_SPECTATOR)) _local_company = bck;
 		_docommand_recursive = 0;
 		_cmd_text = NULL;
 		ClearStorageChanges(false);
--- a/src/company_cmd.cpp	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/company_cmd.cpp	Tue Oct 07 20:57:41 2008 +0000
@@ -84,10 +84,10 @@
 
 	/* Do not update the patches if we are in the intro GUI */
 	if (IsValidCompanyID(new_company) && _game_mode != GM_MENU) {
-		const Company *p = GetCompany(new_company);
-		_settings_client.gui.autorenew        = p->engine_renew;
-		_settings_client.gui.autorenew_months = p->engine_renew_months;
-		_settings_client.gui.autorenew_money  = p->engine_renew_money;
+		const Company *c = GetCompany(new_company);
+		_settings_client.gui.autorenew        = c->engine_renew;
+		_settings_client.gui.autorenew_months = c->engine_renew_months;
+		_settings_client.gui.autorenew_money  = c->engine_renew_money;
 		InvalidateWindow(WC_GAME_OPTIONS, 0);
 	}
 }
@@ -106,9 +106,9 @@
 	return (_colour_gradient[_company_colours[company]][4]) | IS_PALETTE_COLOR;
 }
 
-void DrawCompanyIcon(CompanyID p, int x, int y)
+void DrawCompanyIcon(CompanyID c, int x, int y)
 {
-	DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOR(p), x, y);
+	DrawSprite(SPR_PLAYER_ICON, COMPANY_SPRITE_COLOR(c), x, y);
 }
 
 /**
--- a/src/company_func.h	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/company_func.h	Tue Oct 07 20:57:41 2008 +0000
@@ -43,7 +43,7 @@
 extern HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5
 void SaveToHighScore();
 void LoadFromHighScore();
-int8 SaveHighScoreValue(const Company *p);
+int8 SaveHighScoreValue(const Company *c);
 int8 SaveHighScoreValueNetwork();
 
 #endif /* COMPANY_FUNC_H */
--- a/src/company_gui.h	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/company_gui.h	Tue Oct 07 20:57:41 2008 +0000
@@ -8,7 +8,7 @@
 #include "company_type.h"
 
 uint16 GetDrawStringCompanyColor(CompanyID company);
-void DrawCompanyIcon(CompanyID p, int x, int y);
+void DrawCompanyIcon(CompanyID c, int x, int y);
 
 void ShowCompanyStations(CompanyID company);
 void ShowCompanyFinances(CompanyID company);
--- a/src/rail.h	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/rail.h	Tue Oct 07 20:57:41 2008 +0000
@@ -238,7 +238,7 @@
  * @param company the company to get the rail types for.
  * @return the rail types.
  */
-RailTypes GetCompanyRailtypes(const CompanyID p);
+RailTypes GetCompanyRailtypes(const CompanyID c);
 
 /**
  * Reset all rail type information to its default values.
--- a/src/vehicle.cpp	Tue Oct 07 20:13:22 2008 +0000
+++ b/src/vehicle.cpp	Tue Oct 07 20:57:41 2008 +0000
@@ -98,7 +98,7 @@
 DEFINE_OLD_POOL_GENERIC(Vehicle, Vehicle)
 
 /** Function to tell if a vehicle needs to be autorenewed
- * @param *p The vehicle owner
+ * @param *c The vehicle owner
  * @return true if the vehicle is old enough for replacement
  */
 bool Vehicle::NeedsAutorenewing(const Company *c) const