From d6bdf51d8360cd1aadc0491c433d538fc5d77f91 Mon Sep 17 00:00:00 2001 From: phosit Date: Mon, 3 Aug 2026 17:44:20 +0200 Subject: [PATCH] Remove CStr::FromInt64$ For the usecase it's better to use `fmt::format`. --- source/ps/CStr.cpp | 7 ------- source/ps/CStr.h | 1 - source/ps/UserReport.cpp | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/source/ps/CStr.cpp b/source/ps/CStr.cpp index 6ceecfd2e2..cedab6cde7 100644 --- a/source/ps/CStr.cpp +++ b/source/ps/CStr.cpp @@ -202,13 +202,6 @@ CStr CStr::Repeat(const CStr& str, size_t reps) // Construction from numbers: -CStr CStr::FromInt64(i64 n) -{ - tstringstream ss; - ss << n; - return ss.str(); -} - CStr CStr::FromDouble(double n) { tstringstream ss; diff --git a/source/ps/CStr.h b/source/ps/CStr.h index 4bae72bb0e..cf7e36cae4 100644 --- a/source/ps/CStr.h +++ b/source/ps/CStr.h @@ -95,7 +95,6 @@ public: // Conversions: - static CStr FromInt64(i64 n); static CStr FromDouble(double n); /** diff --git a/source/ps/UserReport.cpp b/source/ps/UserReport.cpp index 0179600c38..59d86cf892 100644 --- a/source/ps/UserReport.cpp +++ b/source/ps/UserReport.cpp @@ -386,7 +386,7 @@ private: r += "user_id="; AppendEscaped(r, m_UserID); - r += "&time=" + CStr::FromInt64(report.m_Time); + r = fmt::format("{}&time={}", std::move(r), report.m_Time); r += "&type="; AppendEscaped(r, report.m_Type);