From 1ab177757bec9eb28482785f75fd8a4fb8a1313c Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 17 Dec 2009 12:48:02 +0100 Subject: Replace static snprintf() with make_sprintf() where the result is immediately cast to std::string. --- crawl-ref/source/clua.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'crawl-ref/source/clua.cc') 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 -- cgit v1.2.3-54-g00ecf