summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libw32c.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-06-18 14:37:51 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-06-19 14:38:30 +0200
commitb47796fe2177b30c3406e2735c2e7b9b4a892292 (patch)
tree442160799313b0c24a340daa809c1fe718da0039 /crawl-ref/source/libw32c.cc
parent4835408b6ab43dc3c71c0b594bb414fab33921cf (diff)
downloadcrawl-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/libw32c.cc')
-rw-r--r--crawl-ref/source/libw32c.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc
index f283df8941..acb0fbd44b 100644
--- a/crawl-ref/source/libw32c.cc
+++ b/crawl-ref/source/libw32c.cc
@@ -832,7 +832,7 @@ bool kbhit()
{
INPUT_RECORD ir[10];
DWORD read_count = 0;
- PeekConsoleInputW(inbuf, ir, sizeof ir / sizeof(ir[0]), &read_count);
+ PeekConsoleInputW(inbuf, ir, ARRAYSZ(ir), &read_count);
if (read_count > 0)
{
for (unsigned i = 0; i < read_count; ++i)