diff options
author | Neil Moore <neil@s-z.org> | 2013-06-06 18:03:29 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-06-06 18:12:03 -0400 |
commit | 48f42c2f12c3d89f714eea971ff303494f9bfab4 (patch) | |
tree | b81d6ba88cec68902bd13a3162236a86b3356c13 /crawl-ref/source/libunix.cc | |
parent | fbb8015d47d88d2cd48987f033fd439879ea559d (diff) | |
download | crawl-ref-48f42c2f12c3d89f714eea971ff303494f9bfab4.tar.gz crawl-ref-48f42c2f12c3d89f714eea971ff303494f9bfab4.zip |
Avoid a constness warning.
For some nonsensical reason, tigetstr takes a char * instead of
a const char *.
Diffstat (limited to 'crawl-ref/source/libunix.cc')
-rw-r--r-- | crawl-ref/source/libunix.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc index 14a01558ca..aa92856e01 100644 --- a/crawl-ref/source/libunix.cc +++ b/crawl-ref/source/libunix.cc @@ -392,7 +392,8 @@ int unixcurses_get_vi_key(int keyin) // Note that this mangling occurs entirely on the machine Crawl runs // on (and even within crawl's process) rather than where the user's // terminal is, so this check is reliable. - static const char * const kbs = tigetstr("kbs"); + static char kbskey[] = "kbs"; // tigetstr wants a non-const pointer :( + static const char * const kbs = tigetstr(kbskey); static const int bskey = (kbs && kbs != (const char *) -1 && kbs == string("\010")) ? CK_BKSP : KEY_BACKSPACE; |