diff options
author | Adam Borowski <kilobyte@angband.pl> | 2012-06-18 14:37:51 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2012-06-19 14:38:30 +0200 |
commit | b47796fe2177b30c3406e2735c2e7b9b4a892292 (patch) | |
tree | 442160799313b0c24a340daa809c1fe718da0039 /crawl-ref/source/macro.cc | |
parent | 4835408b6ab43dc3c71c0b594bb414fab33921cf (diff) | |
download | crawl-ref-b47796fe2177b30c3406e2735c2e7b9b4a892292.tar.gz crawl-ref-b47796fe2177b30c3406e2735c2e7b9b4a892292.zip |
Use ARRAYSZ() instead of sizeof division, for readability.
Also, it's not vulnerable to changes to the underlying types.
Diffstat (limited to 'crawl-ref/source/macro.cc')
-rw-r--r-- | crawl-ref/source/macro.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/macro.cc b/crawl-ref/source/macro.cc index d61f476549..728e071814 100644 --- a/crawl-ref/source/macro.cc +++ b/crawl-ref/source/macro.cc @@ -153,7 +153,7 @@ static bool userfunc_referenced(int index, const macromap &mm) static bool userfunc_referenced(int index) { - for (unsigned i = 0; i < sizeof(all_maps) / sizeof(*all_maps); ++i) + for (unsigned i = 0; i < ARRAYSZ(all_maps); ++i) { macromap *m = all_maps[i]; if (userfunc_referenced(index, *m)) |