From 52e051cb6924266003ef21814b5ebaf2b7b45241 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 28 Aug 2018 21:30:03 -0400 Subject: ... --- src/util.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src') diff --git a/src/util.cpp b/src/util.cpp index 07849fc..6c8866d 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -64,26 +64,6 @@ const std::string get_current_datetime() { SalticidaeError::SalticidaeError() : msg("unknown") {} -SalticidaeError::SalticidaeError(const std::string &fmt, ...) { - int guessed_size = 128; - std::string buff; - va_list ap; - for (;;) - { - buff.resize(guessed_size); - va_start(ap, fmt); - int nwrote = vsnprintf((char *)buff.data(), guessed_size, fmt.c_str(), ap); - if (nwrote < 0 || nwrote == guessed_size) - { - guessed_size <<= 1; - continue; - } - buff.resize(nwrote); - msg = std::move(buff); - break; - } -} - void Logger::write(const char *tag, const char *fmt, va_list ap) { fprintf(output, "%s [%s %s] ", get_current_datetime().c_str(), prefix, tag); vfprintf(output, fmt, ap); -- cgit v1.2.3-70-g09d2