summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-11-27 01:19:46 +0100
committerCarl Hetherington <cth@carlh.net>2025-11-27 01:19:57 +0100
commite282a2819c24517cd54940324f4cc019aaabdf52 (patch)
treea3113d9b979eb953f3a079af0f58a7e717c8c526
parentfedf8b82a0d455f66ad55ee8ed387bee856c039e (diff)
Cleanup: replace stdio with fmt library.
-rw-r--r--src/lib/encoded_log_entry.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/encoded_log_entry.cc b/src/lib/encoded_log_entry.cc
index 28ab9d6e3..9a0fe5e49 100644
--- a/src/lib/encoded_log_entry.cc
+++ b/src/lib/encoded_log_entry.cc
@@ -20,7 +20,7 @@
#include "encoded_log_entry.h"
-#include <cstdio>
+#include <fmt/format.h>
using std::string;
@@ -41,7 +41,5 @@ EncodedLogEntry::EncodedLogEntry(int frame, string ip, double receive, double en
string
EncodedLogEntry::message() const
{
- char buffer[256];
- snprintf(buffer, sizeof(buffer), "Encoded frame %d from %s: receive %.2fs encode %.2fs send %.2fs.", _frame, _ip.c_str(), _receive, _encode, _send);
- return buffer;
+ return fmt::format("Encoded frame {} from {}: receive {:.2f}s encode {:.2f}s send {:.2f}s.", _frame, _ip.c_str(), _receive, _encode, _send);
}