summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-12-17 12:48:02 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-12-17 12:48:02 +0100
commit1ab177757bec9eb28482785f75fd8a4fb8a1313c (patch)
tree4b1c8babcca442dc8b91a624b842bc5f30013747 /crawl-ref/source/clua.cc
parentc266f14414471d5252130c70bafa0c60f85a265c (diff)
downloadcrawl-ref-1ab177757bec9eb28482785f75fd8a4fb8a1313c.tar.gz
crawl-ref-1ab177757bec9eb28482785f75fd8a4fb8a1313c.zip
Replace static snprintf() with make_sprintf() where the result is immediately cast
to std::string.
Diffstat (limited to 'crawl-ref/source/clua.cc')
-rw-r--r--crawl-ref/source/clua.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index b30e84dc1e..2cd15a4bbf 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -839,9 +839,7 @@ void lua_text_pattern::post_pattern(std::string &pat, std::string &fn) const
std::string lua_text_pattern::new_fn_name()
{
- char buf[100];
- snprintf(buf, sizeof buf, "__ch_stash_search_%lu", lfndx++);
- return (buf);
+ return (make_stringf("__ch_stash_search_%lu", lfndx++));
}
bool lua_text_pattern::translate() const