diff options
author | Attila Molnar <attilamolnar@hush.com> | 2013-05-20 11:05:05 -0700 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2013-05-20 11:05:05 -0700 |
commit | 991a6a429bd6abc70c0eac33bcca124b0600cc0f (patch) | |
tree | 73961818b96646cfbe0a0ff945a23db04edc4823 /src/snomasks.cpp | |
parent | 3ce33ee0e6bc0b8fbe2a564a37e02d2e56510b06 (diff) | |
parent | 4e40ee49bba3f7bab05a58516e2039351fb33069 (diff) |
Merge pull request #542 from ShutterQuick/inspircd+printfcleanup
Replaced all the individual vsnprintfing with a macro
Diffstat (limited to 'src/snomasks.cpp')
-rw-r--r-- | src/snomasks.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
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() |