Codechange: Move flags in CommandProc in front of the command arguments.

This commit is contained in:
Michael Lutz
2021-10-10 02:08:52 +02:00
parent 33ca4f2b99
commit 7048e1522f
40 changed files with 286 additions and 286 deletions

View File

@@ -2010,14 +2010,14 @@ extern int GetAmountOwnedBy(const Company *c, Owner owner);
/**
* Acquire shares in an opposing company.
* @param tile unused
* @param flags type of operation
* @param tile unused
* @param p1 company to buy the shares from
* @param p2 unused
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
CommandCost CmdBuyShareInCompany(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
CommandCost cost(EXPENSES_OTHER);
CompanyID target_company = (CompanyID)p1;
@@ -2062,14 +2062,14 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1,
/**
* Sell shares in an opposing company.
* @param tile unused
* @param flags type of operation
* @param tile unused
* @param p1 company to sell the shares from
* @param p2 unused
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
CommandCost CmdSellShareInCompany(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
CompanyID target_company = (CompanyID)p1;
Company *c = Company::GetIfValid(target_company);
@@ -2103,14 +2103,14 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1
* When a competing company is gone bankrupt you get the chance to purchase
* that company.
* @todo currently this only works for AI companies
* @param tile unused
* @param flags type of operation
* @param tile unused
* @param p1 company to buy up
* @param p2 unused
* @param text unused
* @return the cost of this operation or an error
*/
CommandCost CmdBuyCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const std::string &text)
CommandCost CmdBuyCompany(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
{
CompanyID target_company = (CompanyID)p1;
Company *c = Company::GetIfValid(target_company);