summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-20 15:32:58 +0000
committeralberth <alberth@openttd.org>2010-03-20 15:32:58 +0000
commitcced6b35cb83bad1397fc1cd0d42277a85c1fea9 (patch)
treea874bca1257c1d71294e0759388f8a7dbedef335
parentf05a8635fdaea2bf3e9148a070d3750afbba8ebc (diff)
downloadopenttd-cced6b35cb83bad1397fc1cd0d42277a85c1fea9.tar.xz
(svn r19484) -Codechange: Rename parameter 'x' of CalcBridgeLenCostFactor() to 'length'.
-rw-r--r--src/tunnelbridge_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index b2ef22ee2..16fc030f5 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -71,17 +71,17 @@ void ResetBridges()
* @param length Length of the bridge.
* @return Price factor for the bridge.
*/
-int CalcBridgeLenCostFactor(int x)
+int CalcBridgeLenCostFactor(int length)
{
int n;
int r;
- if (x < 2) return x;
- x -= 2;
+ if (length < 2) return length;
+ length -= 2;
for (n = 0, r = 2;; n++) {
- if (x <= n) return r + x * n;
+ if (length <= n) return r + length * n;
r += n * n;
- x -= n;
+ length -= n;
}
}