diff options
author | alberth <alberth@openttd.org> | 2010-03-20 15:30:57 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-03-20 15:30:57 +0000 |
commit | f05a8635fdaea2bf3e9148a070d3750afbba8ebc (patch) | |
tree | 4a02a67c38cdf022a8c068ecb316dcbde16a640b /src/misc_cmd.cpp | |
parent | 073f627930ba7816302afe10dcd2b44031c70fb6 (diff) | |
download | openttd-f05a8635fdaea2bf3e9148a070d3750afbba8ebc.tar.xz |
(svn r19483) -Codechange: Code layout fixes, and parentheses reduction.
Diffstat (limited to 'src/misc_cmd.cpp')
-rw-r--r-- | src/misc_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index ffa6450af..688f15a25 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -53,7 +53,7 @@ CommandCost CmdIncreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint loan = _economy.max_loan - c->current_loan; break; case 2: // Take the given amount of loan - if ((((int32)p1 < LOAN_INTERVAL) || c->current_loan + (int32)p1 > _economy.max_loan || (p1 % LOAN_INTERVAL) != 0)) return CMD_ERROR; + if ((int32)p1 < LOAN_INTERVAL || c->current_loan + (int32)p1 > _economy.max_loan || p1 % LOAN_INTERVAL != 0) return CMD_ERROR; loan = p1; break; } @@ -97,7 +97,7 @@ CommandCost CmdDecreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint loan -= loan % LOAN_INTERVAL; break; case 2: // Repay the given amount of loan - if ((p1 % LOAN_INTERVAL != 0) || ((int32)p1 < LOAN_INTERVAL)) return CMD_ERROR; // Invalid amount to loan + if (p1 % LOAN_INTERVAL != 0 || (int32)p1 < LOAN_INTERVAL) return CMD_ERROR; // Invalid amount to loan loan = p1; break; } |