diff options
| author | 2023-01-23 09:37:15 +0000 | |
|---|---|---|
| committer | 2023-01-23 13:07:53 +0000 | |
| commit | 7edc627317599950cbbc7442f5d0c781203a014b (patch) | |
| tree | 4a38b88b01459eb21c49c16e0eed7ad18b59d083 /src/helperfuncs.cpp | |
| parent | Replace InspIRCd::Format with fmt::format. (diff) | |
Replace VAFORMAT/InspIRCd::Format/... with fmt::sprintf.
Diffstat (limited to 'src/helperfuncs.cpp')
| -rw-r--r-- | src/helperfuncs.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 98ce2fed4..3da8f7e7b 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -387,29 +387,6 @@ std::string Duration::ToString(unsigned long duration) return ret; } -std::string InspIRCd::Format(va_list& vaList, const char* formatString) -{ - static std::vector<char> formatBuffer(1024); - - while (true) - { - va_list dst; - va_copy(dst, vaList); - - int vsnret = vsnprintf(formatBuffer.data(), formatBuffer.size(), formatString, dst); - va_end(dst); - - if (vsnret > 0 && static_cast<unsigned>(vsnret) < formatBuffer.size()) - { - break; - } - - formatBuffer.resize(formatBuffer.size() * 2); - } - - return std::string(formatBuffer.data()); -} - std::string InspIRCd::TimeString(time_t curtime, const char* format, bool utc) { #ifdef _WIN32 |
