Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3b0ec9763829b8fce6e7813b425f03d0ef84c65d
https://github.com/WebKit/WebKit/commit/3b0ec9763829b8fce6e7813b425f03d0ef84c65d
Author: Keita Nonaka <[email protected]>
Date: 2025-05-06 (Tue, 06 May 2025)
Changed paths:
M Source/WTF/wtf/MathExtras.h
Log Message:
-----------
[WTF] Use `std::trunc` in `isIntegral` function for Correct Integral Check
instead of `static_cast<int>`
https://bugs.webkit.org/show_bug.cgi?id=292617
Reviewed by Chris Dumez.
`static_cast<int>` does not cover the entire range of float, such as `3.4e38f`.
In order to avoid the potential bug,
use `std::trunc` instead of `static_cast<int>` for more reliable check.
* Source/WTF/wtf/MathExtras.h:
(WTF::isIntegral):
Canonical link: https://commits.webkit.org/294596@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes