summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tileweb.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-05-02 01:24:44 +0200
committerAdam Borowski <kilobyte@angband.pl>2012-05-02 02:06:47 +0200
commit0bb7c10f3848f6160b5b5b5fd2db8f801ca808a5 (patch)
tree5cc0ebbaad66ad5620afca236294958036b26a20 /crawl-ref/source/tileweb.h
parentacfdbf2d9da332b668673644ef00a2c45c8f04e4 (diff)
downloadcrawl-ref-0bb7c10f3848f6160b5b5b5fd2db8f801ca808a5.tar.gz
crawl-ref-0bb7c10f3848f6160b5b5b5fd2db8f801ca808a5.zip
Let GCC validate webtiles printfs.
Sadly, clang and gcc earlier than 4.7 insist that printf("") is bad, and the option to disable that (-Wno-format-zero-length) doesn't work in C++ mode. Thus, I had to split {write,send}_message() into two: one with an argument, one without.
Diffstat (limited to 'crawl-ref/source/tileweb.h')
-rw-r--r--crawl-ref/source/tileweb.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/tileweb.h b/crawl-ref/source/tileweb.h
index 7ec1812880..8128ea4cc0 100644
--- a/crawl-ref/source/tileweb.h
+++ b/crawl-ref/source/tileweb.h
@@ -81,9 +81,11 @@ public:
void pop_menu();
void close_all_menus();
- void write_message(const char *format, ...);
+ void write_message();
+ void write_message(PRINTF(1, ));
void finish_message();
- void send_message(const char *format = "", ...);
+ void send_message();
+ void send_message(PRINTF(1, ));
bool has_receivers() { return !m_dest_addrs.empty(); }
bool is_controlled_from_web() { return m_controlled_from_web; }