Browse Source

fix: remove use of banned std::to_string() (#44563)

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 <[email protected]>
trop[bot] 5 months ago
parent
commit
bd81baaf04
1 changed files with 2 additions and 2 deletions
  1. 2 2
      shell/browser/notifications/win/windows_toast_notification.cc

+ 2 - 2
shell/browser/notifications/win/windows_toast_notification.cc

@@ -665,8 +665,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));