From 4e40ee49bba3f7bab05a58516e2039351fb33069 Mon Sep 17 00:00:00 2001 From: Daniel Vassdal Date: Sat, 18 May 2013 11:35:10 -0700 Subject: Replaced vsnprintf with VAFORMAT pretty much everywhere. --- src/snomasks.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'src/snomasks.cpp') diff --git a/src/snomasks.cpp b/src/snomasks.cpp index f018a0d1a..820f65e4b 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -52,26 +52,16 @@ void SnomaskManager::WriteGlobalSno(char letter, const std::string& text) void SnomaskManager::WriteToSnoMask(char letter, const char* text, ...) { - char textbuffer[MAXBUF]; - va_list argsPtr; - - va_start(argsPtr, text); - vsnprintf(textbuffer, MAXBUF, text, argsPtr); - va_end(argsPtr); - - this->WriteToSnoMask(letter, std::string(textbuffer)); + std::string textbuffer; + VAFORMAT(textbuffer, text, text); + this->WriteToSnoMask(letter, textbuffer); } void SnomaskManager::WriteGlobalSno(char letter, const char* text, ...) { - char textbuffer[MAXBUF]; - va_list argsPtr; - - va_start(argsPtr, text); - vsnprintf(textbuffer, MAXBUF, text, argsPtr); - va_end(argsPtr); - - this->WriteGlobalSno(letter, std::string(textbuffer)); + std::string textbuffer; + VAFORMAT(textbuffer, text, text); + this->WriteGlobalSno(letter, textbuffer); } SnomaskManager::SnomaskManager() -- cgit v1.2.3