From 7adb8b1c6a52b6e3415ba1009d0f13c0cf26c6dd Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sun, 26 Dec 2021 17:47:25 +0100 Subject: [PATCH] move string_format to class --- DCSHandler.cpp | 4 ++-- DDHandler.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DCSHandler.cpp b/DCSHandler.cpp index 7345112..6e0f97c 100644 --- a/DCSHandler.cpp +++ b/DCSHandler.cpp @@ -852,7 +852,7 @@ void CDCSHandler::writeStatus(std::ofstream& file) case DIR_OUTGOING: if (reflector->m_linkState == DCS_LINKED) { std::string text; - text = string_format("%04d-%02d-%02d %02d:%02d:%02d: DCS link - Type: Repeater Rptr: %s Refl: %s Dir: Outgoing\n", + text = CStringUtils::string_format("%04d-%02d-%02d %02d:%02d:%02d: DCS link - Type: Repeater Rptr: %s Refl: %s Dir: Outgoing\n", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, reflector->m_repeater.c_str(), GET_DISP_REFLECTOR(reflector).c_str()); file << text; @@ -862,7 +862,7 @@ void CDCSHandler::writeStatus(std::ofstream& file) case DIR_INCOMING: if (reflector->m_linkState == DCS_LINKED) { std::string text; - text = string_format("%04d-%02d-%02d %02d:%02d:%02d: DCS link - Type: Repeater Rptr: %s Refl: %s Dir: Incoming\n", + text = CStringUtils::string_format("%04d-%02d-%02d %02d:%02d:%02d: DCS link - Type: Repeater Rptr: %s Refl: %s Dir: Incoming\n", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, reflector->m_repeater.c_str(), GET_DISP_REFLECTOR(reflector).c_str()); file << text; diff --git a/DDHandler.cpp b/DDHandler.cpp index cde2670..b3144fb 100644 --- a/DDHandler.cpp +++ b/DDHandler.cpp @@ -387,7 +387,7 @@ void CDDHandler::writeStatus(const CEthernet& ethernet) time_t timeNow = ::time(NULL); struct tm* tm = ::gmtime(&timeNow); - std::string text = string_format("%04d-%02d-%02d %02d:%02d:%02d: %02X:%02X:%02X:%02X:%02X:%02X %s\n", + std::string text = CStringUtils::string_format("%04d-%02d-%02d %02d:%02d:%02d: %02X:%02X:%02X:%02X:%02X:%02X %s\n", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec, address[0], address[1], address[2], address[3], address[4], address[5], callsign.c_str());