Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd8f00ca49ace748f136360021b1b6f37ae73de1
      
https://github.com/WebKit/WebKit/commit/fd8f00ca49ace748f136360021b1b6f37ae73de1
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-03-27 (Fri, 27 Mar 2026)

  Changed paths:
    M Source/WTF/wtf/IntervalSet.h

  Log Message:
  -----------
  Use std::midpoint() in IntervalSet.h
https://bugs.webkit.org/show_bug.cgi?id=310856
rdar://173461323

Reviewed by Chris Dumez.

Use C++20's std::midpoint() [1] in IntervalSet.h to compute the
midpoint of two size_t values. std::midpoint() is more expressive
and avoids potential overflow issues compared to (a + b) / 2.

[1] https://en.cppreference.com/w/cpp/numeric/midpoint

* Source/WTF/wtf/IntervalSet.h:
(WTF::IntervalSet::tryRedistributeLeftAndInsert):
(WTF::IntervalSet::tryRedistributeRightAndInsert):

Canonical link: https://commits.webkit.org/310074@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to