aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-08-28 21:30:03 -0400
committerDeterminant <[email protected]>2018-08-28 21:30:03 -0400
commit52e051cb6924266003ef21814b5ebaf2b7b45241 (patch)
tree42db678daa02d0665ef9b0f358d39233b57379af /src
parent6de2e6d9ce2ab3d076ac667dc875e8fd71b919fa (diff)
...
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp20
1 files changed, 0 insertions, 20 deletions
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);