From 2f524dfb1d28b8c8b9796296d6e43ee8c34b8968 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 20:31:08 -0600 Subject: [PATCH] fix: remove use of banned std::to_string() (#44561) Use base::NumberToString() instead Xref: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md#std_sto_i_l_ul_ll_ull_f_d_ld_to_string_banned Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr --- shell/browser/notifications/win/windows_toast_notification.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/browser/notifications/win/windows_toast_notification.cc b/shell/browser/notifications/win/windows_toast_notification.cc index 35a09f02d210..1c4fa0bd47d2 100644 --- a/shell/browser/notifications/win/windows_toast_notification.cc +++ b/shell/browser/notifications/win/windows_toast_notification.cc @@ -666,8 +666,8 @@ IFACEMETHODIMP ToastEventHandler::Invoke( winui::Notifications::IToastFailedEventArgs* e) { HRESULT error; e->get_ErrorCode(&error); - std::string errorMessage = - "Notification failed. HRESULT:" + std::to_string(error); + std::string errorMessage = base::StrCat( + {"Notification failed. HRESULT:", base::NumberToString(error)}); content::GetUIThreadTaskRunner({})->PostTask( FROM_HERE, base::BindOnce(&Notification::NotificationFailed, notification_, errorMessage));