summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/losglobal.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-07-06 00:55:50 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-07-06 00:55:50 +0200
commit80a2d8a18ee93dfa3d541b71ff1eac53d737499c (patch)
tree9293162f23eff858ec4fc1c97fed383ea0f7f258 /crawl-ref/source/losglobal.cc
parentd34e9d05feff83c8a8f83671a53375018fa692fe (diff)
downloadcrawl-ref-80a2d8a18ee93dfa3d541b71ff1eac53d737499c.tar.gz
crawl-ref-80a2d8a18ee93dfa3d541b71ff1eac53d737499c.zip
Declare globallos static, telling the compiler there are no nasty aliases.
Surprisingly, this speeds things up by nearly 1%.
Diffstat (limited to 'crawl-ref/source/losglobal.cc')
-rw-r--r--crawl-ref/source/losglobal.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/losglobal.cc b/crawl-ref/source/losglobal.cc
index ed68e60d6d..8d565621eb 100644
--- a/crawl-ref/source/losglobal.cc
+++ b/crawl-ref/source/losglobal.cc
@@ -9,11 +9,11 @@
typedef unsigned char losfield_t;
typedef losfield_t halflos_t[LOS_MAX_RANGE+1][2*LOS_MAX_RANGE+1];
-const int o_half_x = 0;
-const int o_half_y = LOS_MAX_RANGE;
+static const int o_half_x = 0;
+static const int o_half_y = LOS_MAX_RANGE;
typedef halflos_t globallos_t[GXM][GYM];
-globallos_t globallos;
+static globallos_t globallos;
static losfield_t* _lookup_globallos(const coord_def& p, const coord_def& q)
{