From a69cca042b64d39ebdcf241897a7c0f5b5b2e46e Mon Sep 17 00:00:00 2001 From: "yurii.lozytskyi" Date: Sun, 25 Sep 2022 15:02:17 +0300 Subject: [PATCH] fix signed / unsigned comparison --- .../win/windows_toast_notification.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/shell/browser/notifications/win/windows_toast_notification.cc b/shell/browser/notifications/win/windows_toast_notification.cc index 0f6122f102a64..13c7727badf10 100644 --- a/shell/browser/notifications/win/windows_toast_notification.cc +++ b/shell/browser/notifications/win/windows_toast_notification.cc @@ -1283,13 +1283,15 @@ class NotificationActivator final // SAP-15908 refine notification-activation for cold start if (dataCount) { stm << L"["; // json array open brace - std::for_each( - data, data + dataCount, - [&](const NOTIFICATION_USER_INPUT_DATA& item) { - stm << item - // avoid problem with last delimeter - << std::wstring((&item - data + 1 == dataCount) ? L"" : L","); - }); + std::for_each(data, data + dataCount, + [&](const NOTIFICATION_USER_INPUT_DATA& item) { + stm << item + // avoid problem with last delimeter + << std::wstring((static_cast(&item - data + + 1) == dataCount) + ? L"" + : L","); + }); stm << L"]"; // json array close brace } auto* app = api::App::Get();