Skip to content

Commit

Permalink
fix signed / unsigned comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
yurii.lozytskyi committed Sep 25, 2022
1 parent 1d5208c commit a69cca0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions shell/browser/notifications/win/windows_toast_notification.cc
Expand Up @@ -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<ULONG>(&item - data +
1) == dataCount)
? L""
: L",");
});
stm << L"]"; // json array close brace
}
auto* app = api::App::Get();
Expand Down

0 comments on commit a69cca0

Please sign in to comment.